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 201811 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]
Junit test
patch.txt (text/plain), 3.07 KB, created by
Satyam Kandula
on 2011-08-19 12:10:55 EDT
(
hide
)
Description:
Junit test
Filename:
MIME Type:
Creator:
Satyam Kandula
Created:
2011-08-19 12:10:55 EDT
Size:
3.07 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java,v >retrieving revision 1.220 >diff -u -r1.220 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 28 Jul 2011 17:06:11 -0000 1.220 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 19 Aug 2011 16:08:41 -0000 >@@ -13672,4 +13672,44 @@ > } > } > >+// Ensure that results for jar are reported after the source projects >+public void testBug345807() throws CoreException { >+ try { >+ // Create a project depending on the jar >+ IJavaProject p1 = createJavaProject("P1", new String[] {}, new String[] {"/P1/01b345807.jar"}, ""); >+ createJar(new String[] { >+ "inlib/P345807Test.java", >+ "package inlib;\n" + >+ "public class P345807Test {\n" + >+ "}" >+ }, p1.getProject().getLocation().append("01b345807.jar").toOSString()); >+ refresh(p1); >+ >+ // Create another project with the same class name >+ createJavaProject("Project2", new String[] {""}, new String[] {}, ""); >+ createFile("/Project2/P345807Test.java", >+ "public class P345807Test {\n" + >+ "}\n"); >+ >+ waitUntilIndexesReady(); >+ SearchTests.SearchTypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); >+ new SearchEngine().searchAllTypeNames( >+ null, >+ SearchPattern.R_EXACT_MATCH, // case insensitive >+ "P345807Test".toCharArray(), >+ SearchPattern.R_EXACT_MATCH, // case insensitive >+ TYPE, >+ SearchEngine.createWorkspaceScope(), >+ requestor, >+ IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, >+ null >+ ); >+ assertEquals("Results not in proper order", "P345807Test\ninlib.P345807Test", requestor.unsortedString()); >+ } catch (IOException e) { >+ assertTrue(false); // report a failure >+ } finally { >+ deleteProject("P1"); >+ deleteProject("Project2"); >+ } >+} > } >\ No newline at end of file >Index: src/org/eclipse/jdt/core/tests/model/SearchTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SearchTests.java,v >retrieving revision 1.54 >diff -u -r1.54 SearchTests.java >--- src/org/eclipse/jdt/core/tests/model/SearchTests.java 14 Jan 2011 17:02:22 -0000 1.54 >+++ src/org/eclipse/jdt/core/tests/model/SearchTests.java 19 Aug 2011 16:08:41 -0000 >@@ -97,6 +97,19 @@ > } > return buffer.toString(); > } >+ public String unsortedString() { >+ int length = this.results.size(); >+ String[] strings = new String[length]; >+ this.results.toArray(strings); >+ StringBuffer buffer = new StringBuffer(100); >+ for (int i = 0; i < length; i++){ >+ buffer.append(strings[i]); >+ if (i != length-1) { >+ buffer.append('\n'); >+ } >+ } >+ return buffer.toString(); >+ } > public int size() { > return this.results.size(); > }
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
Actions:
View
|
Diff
Attachments on
bug 348507
:
197481
|
198304
|
198306
| 201811