List of usage examples for org.eclipse.jdt.core.search IJavaSearchConstants IMPORT_DECLARATION_TYPE_REFERENCE
int IMPORT_DECLARATION_TYPE_REFERENCE
To view the source code for org.eclipse.jdt.core.search IJavaSearchConstants IMPORT_DECLARATION_TYPE_REFERENCE.
Click Source Link
From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.ImportMatchLocatorParser.java
License:Open Source License
protected ImportMatchLocatorParser(ProblemReporter problemReporter, MatchLocator locator) { super(problemReporter, locator); this.reportImportMatch = this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.IMPORT_DECLARATION_TYPE_REFERENCE) != 0; }
From source file:de.loskutov.dh.search.SearchHelper.java
License:Open Source License
/** * Blocks current thread until search is done *//* w w w . ja va 2 s . c o m*/ public List<IJavaElement> getReferences(IProgressMonitor monitor) throws CoreException { pattern = SearchPattern.createPattern(searchRoot.getJavaElement(), IJavaSearchConstants.REFERENCES | ~IJavaSearchConstants.IMPORT_DECLARATION_TYPE_REFERENCE, // | IJavaSearchConstants.IGNORE_DECLARING_TYPE, SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE | SearchPattern.R_ERASURE_MATCH); if (pattern == null) { // this is packages??? // System.out.println("Search patter is null for: " + elt.getElementName()); return new ArrayList<IJavaElement>(); } scope = conf.createScope(searchRoot.getJavaElement()); JavaReferencesRequestor searchRequestor = new JavaReferencesRequestor(); return search(searchRequestor, monitor); }
From source file:potes.cucumberjvm.eclipseplugin.CucumberLanguage.java
License:Apache License
void checkProject(SearchEngine searchEngine, IJavaProject project, IJavaElement element) throws JavaModelException, CoreException { IType givenType = project.findType("cucumber.annotation.en.Given"); if (givenType != null) { SearchPattern pattern = SearchPattern.createPattern("cucumber.annotation.*.*", IJavaSearchConstants.TYPE, IJavaSearchConstants.IMPORT_DECLARATION_TYPE_REFERENCE, SearchPattern.R_PATTERN_MATCH); IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope( element == null ? project.getChildren() : new IJavaElement[] { element }, element == null); SearchParticipant[] participants = new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }; AnnotationFinder annotationFinder = new AnnotationFinder(project, searchEngine, searchScope, participants);/*from w w w . j ava 2s.c om*/ searchEngine.search(pattern, participants, searchScope, annotationFinder, null); searchNonLanguageAnnotation(searchEngine, project, searchScope, participants, "Before"); searchNonLanguageAnnotation(searchEngine, project, searchScope, participants, "After"); searchNonLanguageAnnotation(searchEngine, project, searchScope, participants, "Order"); } }