use of org.eclipse.wst.common.core.search.SearchParticipant in project webtools.sourceediting by eclipse.
the class XSDSearchListProvider method findMatches.
protected void findMatches(SearchEngine searchEngine, SearchRequestor requestor, SearchScope scope, QualifiedName metaName) {
try {
XMLComponentDeclarationPattern pattern = new XMLComponentDeclarationPattern(new QualifiedName("*", "*"), metaName, SearchPattern.R_PATTERN_MATCH);
// TODO (cs) revist this... we shouldn't be needing to hard-code partipant id's
// All we're really doing here is trying to avoid finding matches in
// wsdl's since we don't ever want to import/include a wsdl from a schema!
// Maybe we should just scope out any file types that aren't xsd's using a
// custom SearchScope?
//
SearchParticipant particpant = SearchPlugin.getDefault().getSearchParticipant("org.eclipse.wst.xsd.search.XSDSearchParticipant");
Assert.isNotNull(particpant);
SearchParticipant[] participants = { particpant };
searchEngine.search(pattern, requestor, participants, scope, null, new NullProgressMonitor());
} catch (CoreException e) {
e.printStackTrace();
}
}
Aggregations