Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 198304 Details for
Bug 348507
[search] Hyperlinks from the Java Stack Trace console should search the workspace in CLASSPATH order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
updated patch
stacktraceconsole2.txt (text/plain), 3.77 KB, created by
Nikolay Botev
on 2011-06-21 02:01:31 EDT
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
Nikolay Botev
Created:
2011-06-21 02:01:31 EDT
Size:
3.77 KB
patch
obsolete
>Index: search/org/eclipse/jdt/internal/core/search/IndexSelector.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/IndexSelector.java,v >retrieving revision 1.48.2.1 >diff -u -r1.48.2.1 IndexSelector.java >--- search/org/eclipse/jdt/internal/core/search/IndexSelector.java 28 Jun 2010 06:57:23 -0000 1.48.2.1 >+++ search/org/eclipse/jdt/internal/core/search/IndexSelector.java 21 Jun 2011 05:57:57 -0000 >@@ -7,9 +7,12 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Nikolay Botev - Bug 348507 > *******************************************************************************/ > package org.eclipse.jdt.internal.core.search; > >+import java.util.LinkedHashSet; >+ > import org.eclipse.core.resources.IFolder; > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.IPath; >@@ -180,7 +183,8 @@ > private void initializeIndexLocations() { > IPath[] projectsAndJars = this.searchScope.enclosingProjectsAndJars(); > IndexManager manager = JavaModelManager.getIndexManager(); >- SimpleSet locations = new SimpleSet(); >+ // use a linked set to preserve the order during search: see bug 348507 >+ LinkedHashSet locations = new LinkedHashSet(); > IJavaElement focus = MatchLocator.projectOrJarFocus(this.pattern); > if (focus == null) { > for (int i = 0; i < projectsAndJars.length; i++) { >@@ -263,12 +267,8 @@ > } > } > >- this.indexLocations = new IPath[locations.elementSize]; >- Object[] values = locations.values; >- int count = 0; >- for (int i = values.length; --i >= 0;) >- if (values[i] != null) >- this.indexLocations[count++] = (IPath) values[i]; >+ locations.remove(null); // Ensure no nulls >+ this.indexLocations = (IPath[]) locations.toArray(new IPath[locations.size()]); > } > > public IPath[] getIndexLocations() { >Index: search/org/eclipse/jdt/internal/core/search/JavaWorkspaceScope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaWorkspaceScope.java,v >retrieving revision 1.36 >diff -u -r1.36 JavaWorkspaceScope.java >--- search/org/eclipse/jdt/internal/core/search/JavaWorkspaceScope.java 27 Jun 2008 16:04:09 -0000 1.36 >+++ search/org/eclipse/jdt/internal/core/search/JavaWorkspaceScope.java 21 Jun 2011 05:57:57 -0000 >@@ -7,11 +7,12 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Nikolay Botev - Bug 348507 > *******************************************************************************/ > package org.eclipse.jdt.internal.core.search; > > import java.util.HashMap; >-import java.util.HashSet; >+import java.util.LinkedHashSet; > import java.util.Set; > > import org.eclipse.core.resources.IFolder; >@@ -72,13 +73,22 @@ > long start = BasicSearchEngine.VERBOSE ? System.currentTimeMillis() : -1; > try { > IJavaProject[] projects = JavaModelManager.getJavaModelManager().getJavaModel().getJavaProjects(); >- Set paths = new HashSet(projects.length * 2); >+ // use a linked set to preserve the order during search: see bug 348507 >+ Set paths = new LinkedHashSet(projects.length * 2); > for (int i = 0, length = projects.length; i < length; i++) { > JavaProject javaProject = (JavaProject) projects[i]; > > // Add project full path > IPath projectPath = javaProject.getProject().getFullPath(); > paths.add(projectPath); >+ } >+ >+ // add the project source paths first in a separate loop above >+ // to ensure source files always get higher precedence during search. >+ // see bug 348507 >+ >+ for (int i = 0, length = projects.length; i < length; i++) { >+ JavaProject javaProject = (JavaProject) projects[i]; > > // Add project libraries paths > IClasspathEntry[] entries = javaProject.getResolvedClasspath();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
satyam.kandula
:
iplog+
satyam.kandula
:
review+
Actions:
View
|
Diff
Attachments on
bug 348507
:
197481
| 198304 |
198306
|
201811