use of org.eclipse.che.ide.ext.java.shared.dto.search.Match in project che by eclipse.
the class TypeNode method getMatches.
/**
* Collect all matches for this type node.
*
* @return the list of matches.
*/
public List<Match> getMatches() {
List<Match> matches = new ArrayList<>();
if (compilationUnit != null && type.isPrimary()) {
for (ImportDeclaration importDeclaration : compilationUnit.getImports()) {
addAllMatches(importDeclaration.getHandleIdentifier(), matches);
}
}
addAllMatches(type.getHandleIdentifier(), matches);
for (Initializer initializer : type.getInitializers()) {
addAllMatches(initializer.getHandleIdentifier(), matches);
}
for (Field field : type.getFields()) {
addAllMatches(field.getHandleIdentifier(), matches);
}
return matches;
}
Aggregations