Example usage for org.eclipse.jdt.internal.core.search.matching SuperTypeNamesCollector collect

List of usage examples for org.eclipse.jdt.internal.core.search.matching SuperTypeNamesCollector collect

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core.search.matching SuperTypeNamesCollector collect.

Prototype

public char[][][] collect() throws JavaModelException 

Source Link

Usage

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

License:Open Source License

protected char[][][] computeSuperTypeNames(IType focusType) {
    String fullyQualifiedName = focusType.getFullyQualifiedName();
    int lastDot = fullyQualifiedName.lastIndexOf('.');
    char[] qualification = lastDot == -1 ? CharOperation.NO_CHAR
            : fullyQualifiedName.substring(0, lastDot).toCharArray();
    char[] simpleName = focusType.getElementName().toCharArray();

    SuperTypeNamesCollector superTypeNamesCollector = new SuperTypeNamesCollector(this.pattern, simpleName,
            qualification, new MatchLocator(this.pattern, this.requestor, this.scope, this.progressMonitor), // clone MatchLocator so that it has no side effect
            focusType, this.progressMonitor);
    try {// w  ww  . ja v a2  s  .c om
        this.allSuperTypeNames = superTypeNamesCollector.collect();
    } catch (JavaModelException e) {
        // problem collecting super type names: leave it null
    }
    return this.allSuperTypeNames;
}