Lines 13672-13675
Link Here
|
13672 |
} |
13672 |
} |
13673 |
} |
13673 |
} |
13674 |
|
13674 |
|
|
|
13675 |
// Ensure that results for jar are reported after the source projects |
13676 |
public void testBug345807() throws CoreException { |
13677 |
try { |
13678 |
// Create a project depending on the jar |
13679 |
IJavaProject p1 = createJavaProject("P1", new String[] {}, new String[] {"/P1/01b345807.jar"}, ""); |
13680 |
createJar(new String[] { |
13681 |
"inlib/P345807Test.java", |
13682 |
"package inlib;\n" + |
13683 |
"public class P345807Test {\n" + |
13684 |
"}" |
13685 |
}, p1.getProject().getLocation().append("01b345807.jar").toOSString()); |
13686 |
refresh(p1); |
13687 |
|
13688 |
// Create another project with the same class name |
13689 |
createJavaProject("Project2", new String[] {""}, new String[] {}, ""); |
13690 |
createFile("/Project2/P345807Test.java", |
13691 |
"public class P345807Test {\n" + |
13692 |
"}\n"); |
13693 |
|
13694 |
waitUntilIndexesReady(); |
13695 |
SearchTests.SearchTypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
13696 |
new SearchEngine().searchAllTypeNames( |
13697 |
null, |
13698 |
SearchPattern.R_EXACT_MATCH, // case insensitive |
13699 |
"P345807Test".toCharArray(), |
13700 |
SearchPattern.R_EXACT_MATCH, // case insensitive |
13701 |
TYPE, |
13702 |
SearchEngine.createWorkspaceScope(), |
13703 |
requestor, |
13704 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
13705 |
null |
13706 |
); |
13707 |
assertEquals("Results not in proper order", "P345807Test\ninlib.P345807Test", requestor.unsortedString()); |
13708 |
} catch (IOException e) { |
13709 |
assertTrue(false); // report a failure |
13710 |
} finally { |
13711 |
deleteProject("P1"); |
13712 |
deleteProject("Project2"); |
13713 |
} |
13714 |
} |
13675 |
} |
13715 |
} |