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

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

Introduction

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

Prototype

int SUPER_REFERENCE

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

Click Source Link

Document

Return only super field accesses or super 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);
    }//from  www  .  j a v  a  2  s .  co m
}

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

License:Open Source License

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

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

License:Open Source License

protected void consumeMethodInvocationSuperWithTypeArguments() {
    super.consumeMethodInvocationSuperWithTypeArguments();
    if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.SUPER_REFERENCE) != 0) {
        this.patternLocator.match((MessageSend) this.expressionStack[this.expressionPtr], this.nodeSet);
    }//from w  w w . j  a  v  a  2 s  .  c o  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   ww  w  .  j a v a2 s.  c o 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);
        }
    }
}