List of usage examples for org.eclipse.jdt.internal.core.search IndexSelector canSeeFocus
public static int canSeeFocus(SearchPattern pattern, IPath projectOrJarPath)
From source file:org.eclipse.jdt.internal.core.search.matching.MatchLocator.java
License:Open Source License
private static HashMap workingCopiesThatCanSeeFocus(org.eclipse.jdt.core.ICompilationUnit[] copies, SearchPattern pattern, SearchParticipant participant) { if (copies == null) return new HashMap(); HashMap result = new HashMap(); for (int i = 0, length = copies.length; i < length; i++) { org.eclipse.jdt.core.ICompilationUnit workingCopy = copies[i]; IPath projectOrJar = MatchLocator.getProjectOrJar(workingCopy).getPath(); if (pattern.focus == null || IndexSelector.canSeeFocus(pattern, projectOrJar)) { result.put(workingCopy.getPath().toString(), new WorkingCopyDocument(workingCopy, participant)); }/* www. ja va2 s.c o m*/ } return result; }