Example usage for org.eclipse.jdt.core.search IJavaSearchConstants THIS_REFERENCE

List of usage examples for org.eclipse.jdt.core.search IJavaSearchConstants THIS_REFERENCE

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.search IJavaSearchConstants THIS_REFERENCE.

Prototype

int THIS_REFERENCE

To view the source code for org.eclipse.jdt.core.search IJavaSearchConstants THIS_REFERENCE.

Click Source Link

Document

Return only primary field accesses or primary method invocations (e.g.

Usage

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeFieldAccess(boolean isSuperAccess) {
    super.consumeFieldAccess(isSuperAccess);

    int fineGrain = isSuperAccess ? IJavaSearchConstants.SUPER_REFERENCE : IJavaSearchConstants.THIS_REFERENCE;
    if (this.patternFineGrain == 0 || (this.patternFineGrain & fineGrain) != 0) {
        // this is always a Reference
        this.patternLocator.match((Reference) this.expressionStack[this.expressionPtr], this.nodeSet);
    }// w w  w.  j a  v a2s. c  om
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeMethodInvocationPrimary() {
    super.consumeMethodInvocationPrimary();
    if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.THIS_REFERENCE) != 0) {
        this.patternLocator.match((MessageSend) this.expressionStack[this.expressionPtr], this.nodeSet);
    }//w w  w . j  a  va2  s .c  om
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeMethodInvocationPrimaryWithTypeArguments() {
    super.consumeMethodInvocationPrimaryWithTypeArguments();
    if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.THIS_REFERENCE) != 0) {
        this.patternLocator.match((MessageSend) this.expressionStack[this.expressionPtr], this.nodeSet);
    }//from www. j a v a 2 s. co m
}

From source file:org.eclipse.che.jdt.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

@Override
protected void consumeReferenceExpression(ReferenceExpression referenceExpression) {
    super.consumeReferenceExpression(referenceExpression);
    if (this.patternFineGrain == 0) {
        this.patternLocator.match(referenceExpression, this.nodeSet);
    } else if ((this.patternFineGrain & IJavaSearchConstants.METHOD_REFERENCE_EXPRESSION) != 0) {
        this.patternLocator.match(referenceExpression, this.nodeSet);
    } else if (referenceExpression.lhs.isThis()) {
        if ((this.patternFineGrain & IJavaSearchConstants.THIS_REFERENCE) != 0) {
            this.patternLocator.match(referenceExpression, this.nodeSet);
        }/*from  w  w  w. j  av a2  s .co m*/
    } else if (referenceExpression.lhs.isSuper()) {
        if ((this.patternFineGrain & IJavaSearchConstants.SUPER_REFERENCE) != 0) {
            this.patternLocator.match(referenceExpression, this.nodeSet);
        }
    } else if (referenceExpression.lhs instanceof QualifiedNameReference
            || referenceExpression.lhs instanceof QualifiedTypeReference) {
        if ((this.patternFineGrain & IJavaSearchConstants.QUALIFIED_REFERENCE) != 0) {
            this.patternLocator.match(referenceExpression, this.nodeSet);
        }
    }
}