Lines 10-15
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.jdt.internal.core.search; |
11 |
package org.eclipse.jdt.internal.core.search; |
12 |
|
12 |
|
|
|
13 |
import java.util.LinkedHashSet; |
14 |
|
13 |
import org.eclipse.core.resources.IFolder; |
15 |
import org.eclipse.core.resources.IFolder; |
14 |
import org.eclipse.core.resources.ResourcesPlugin; |
16 |
import org.eclipse.core.resources.ResourcesPlugin; |
15 |
import org.eclipse.core.runtime.IPath; |
17 |
import org.eclipse.core.runtime.IPath; |
Lines 180-186
Link Here
|
180 |
private void initializeIndexLocations() { |
182 |
private void initializeIndexLocations() { |
181 |
IPath[] projectsAndJars = this.searchScope.enclosingProjectsAndJars(); |
183 |
IPath[] projectsAndJars = this.searchScope.enclosingProjectsAndJars(); |
182 |
IndexManager manager = JavaModelManager.getIndexManager(); |
184 |
IndexManager manager = JavaModelManager.getIndexManager(); |
183 |
SimpleSet locations = new SimpleSet(); |
185 |
LinkedHashSet locations = new LinkedHashSet(); |
184 |
IJavaElement focus = MatchLocator.projectOrJarFocus(this.pattern); |
186 |
IJavaElement focus = MatchLocator.projectOrJarFocus(this.pattern); |
185 |
if (focus == null) { |
187 |
if (focus == null) { |
186 |
for (int i = 0; i < projectsAndJars.length; i++) { |
188 |
for (int i = 0; i < projectsAndJars.length; i++) { |
Lines 263-272
Link Here
|
263 |
} |
265 |
} |
264 |
} |
266 |
} |
265 |
|
267 |
|
266 |
this.indexLocations = new IPath[locations.elementSize]; |
268 |
this.indexLocations = new IPath[locations.size()]; |
267 |
Object[] values = locations.values; |
269 |
Object[] values = locations.toArray(); |
268 |
int count = 0; |
270 |
int count = 0; |
269 |
for (int i = values.length; --i >= 0;) |
271 |
for (int i = 0; i < values.length; ++i) |
270 |
if (values[i] != null) |
272 |
if (values[i] != null) |
271 |
this.indexLocations[count++] = (IPath) values[i]; |
273 |
this.indexLocations[count++] = (IPath) values[i]; |
272 |
} |
274 |
} |