Example usage for org.eclipse.jdt.internal.core.search.matching MatchLocator MatchLocator

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

Introduction

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

Prototype

public MatchLocator(SearchPattern pattern, SearchRequestor requestor, IJavaSearchScope scope,
            IProgressMonitor progressMonitor) 

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 {//from   www  .  j a  v  a2s  .co m
        this.allSuperTypeNames = superTypeNamesCollector.collect();
    } catch (JavaModelException e) {
        // problem collecting super type names: leave it null
    }
    return this.allSuperTypeNames;
}