Lines 37-43
Link Here
|
37 |
// All specified tests which do not belong to the class are skipped... |
37 |
// All specified tests which do not belong to the class are skipped... |
38 |
static { |
38 |
static { |
39 |
// TESTS_NAMES = new String[] { "testMethodOccurences" }; |
39 |
// TESTS_NAMES = new String[] { "testMethodOccurences" }; |
40 |
// TESTS_NUMBERS = new int[] { 101022 }; |
40 |
// TESTS_NUMBERS = new int[] { 101426 }; |
41 |
// TESTS_RANGE = new int[] { 16, -1 }; |
41 |
// TESTS_RANGE = new int[] { 16, -1 }; |
42 |
} |
42 |
} |
43 |
protected void tearDown() throws Exception { |
43 |
protected void tearDown() throws Exception { |
Lines 554-559
Link Here
|
554 |
deleteProject("P1"); |
554 |
deleteProject("P1"); |
555 |
} |
555 |
} |
556 |
} |
556 |
} |
|
|
557 |
|
558 |
/** |
559 |
* Bug 101426: Search doesn't work with imported plugin |
560 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=101426" |
561 |
*/ |
562 |
public void testJavaSearchScopeBug101426() throws CoreException { |
563 |
try { |
564 |
IJavaProject project = createJavaProject("P1", new String[] {"src/", "test/", "test2/"}, "bin"); |
565 |
createFile( |
566 |
"/P1/src/Test.java", |
567 |
"public interface ITest {\n" + |
568 |
"}" |
569 |
); |
570 |
createFile( |
571 |
"/P1/test/Test.java", |
572 |
"public class Test {\n" + |
573 |
" ITest test;\n" + |
574 |
"}" |
575 |
); |
576 |
createFile( |
577 |
"/P1/test2/Test.java", |
578 |
"public class Test2 {\n" + |
579 |
" ITest test;\n" + |
580 |
"}" |
581 |
); |
582 |
IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {project}); |
583 |
JavaSearchResultCollector resultCollector = new JavaSearchResultCollector(); |
584 |
resultCollector.showProject = true; |
585 |
search("ITest", TYPE, REFERENCES, scope, resultCollector); |
586 |
assertSearchResults( |
587 |
"test/Test.java [in P1] Test.test [ITest]\n" + |
588 |
"test2/Test.java [in P1] Test2.test [ITest]", |
589 |
resultCollector); |
590 |
} |
591 |
finally { |
592 |
deleteProject("P1"); |
593 |
} |
594 |
} |
557 |
/** |
595 |
/** |
558 |
* Method occurences with 2 unrelated projects that contain the same source. |
596 |
* Method occurences with 2 unrelated projects that contain the same source. |
559 |
* (regression test for bug 33800 search: reporting too many method occurrences) |
597 |
* (regression test for bug 33800 search: reporting too many method occurrences) |