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

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

Introduction

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

Prototype

int CATCH_TYPE_REFERENCE

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

Click Source Link

Document

Return only type references used in a catch header.

Usage

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

License:Open Source License

protected void consumeStatementCatch() {
    super.consumeStatementCatch();
    if ((this.patternFineGrain & IJavaSearchConstants.CATCH_TYPE_REFERENCE) != 0) {
        // when no fine grain flag is set, type reference match is evaluated in getTypeReference(int) method
        LocalDeclaration localDeclaration = (LocalDeclaration) this.astStack[this.astPtr - 1];
        if (localDeclaration.type instanceof UnionTypeReference) {
            TypeReference[] refs = ((UnionTypeReference) localDeclaration.type).typeReferences;
            for (int i = 0, len = refs.length; i < len; i++) {
                this.patternLocator.match(refs[i], this.nodeSet);
            }/*  w w w .  j a va2s  . c o  m*/
        } else {
            this.patternLocator.match(localDeclaration.type, this.nodeSet);
        }
    }
}