return type;
}
public static void findMatchingElementClassNames(String elementTypeName, int matchType, TypeNameCollector typeNameCollector, IProgressMonitor progressMonitor) throws JavaModelException {
if (elementTypeName != null) {
SearchEngine searchEngine = new SearchEngine();
//IJavaSearchScope searchScope = new WOHierarchyScope(typeNameCollector.getSuperclassType(), typeNameCollector.getProject());
IJavaSearchScope searchScope = WOHierarchyScope.hierarchyScope(typeNameCollector.getSuperclassType(), typeNameCollector.getProject().getProject());
int lastDotIndex = elementTypeName.lastIndexOf('.');
char[] packageName;
char[] typeName;
if (lastDotIndex == -1) {
packageName = null;
typeName = elementTypeName.toCharArray();
}
else {
packageName = elementTypeName.substring(0, lastDotIndex).toCharArray();
typeName = elementTypeName.substring(lastDotIndex + 1).toCharArray();
}
searchEngine.searchAllTypeNames(packageName, SearchPattern.R_EXACT_MATCH, typeName, matchType, IJavaSearchConstants.CLASS, searchScope, typeNameCollector, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, progressMonitor);
}
}