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 4379 Details for
Bug 35755
Search in hierarchy misses dependent projects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test testHierarchyScope3().
JavaSearchMultipleProjectsTests_patch.txt (text/plain), 2.57 KB, created by
Jerome Lanneluc
on 2003-03-28 07:21:43 EST
(
hide
)
Description:
Regression test testHierarchyScope3().
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2003-03-28 07:21:43 EST
Size:
2.57 KB
patch
obsolete
>Index: JavaSearchMultipleProjectsTests.java >=================================================================== >RCS file: /data/cvs/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchMultipleProjectsTests.java,v >retrieving revision 1.4 >diff -u -r1.4 JavaSearchMultipleProjectsTests.java >--- JavaSearchMultipleProjectsTests.java 11 Mar 2003 15:07:11 -0000 1.4 >+++ JavaSearchMultipleProjectsTests.java 28 Mar 2003 12:16:26 -0000 >@@ -54,7 +54,7 @@ > "/P2/Y.java", > "import p.X;\n" + > "public class Y extends X {\n" + >- " void foo() {\n" + >+ " protected void foo() {\n" + > " }\n" + > "}" > ); >@@ -102,14 +102,14 @@ > "/P2/Y.java", > "import p.X;\n" + > "public class Y extends X {\n" + >- " void foo() {\n" + >+ " protected void foo() {\n" + > " }\n" + > "}" > ); > createFile( > "/P2/Z.java", > "public class Z extends Y {\n" + >- " void foo() {\n" + >+ " protected void foo() {\n" + > " }\n" + > "}" > ); >@@ -128,6 +128,55 @@ > resultCollector); > assertEquals( > "p/X.java [in P1] p.X.bar() -> void [foo()]", >+ resultCollector.toString()); >+ } finally { >+ deleteProject("P1"); >+ deleteProject("P2"); >+ } >+} >+/** >+ * Search for references in a hierarchy should find matches in super type. >+ * (regression test for bug 35755 Search in hierarchy misses dependent projects ) >+ */ >+public void testHierarchyScope3() throws CoreException { >+ try { >+ createJavaProject("P1"); >+ createFolder("/P1/p"); >+ createFile( >+ "/P1/p/X.java", >+ "package p;\n" + >+ "public class X {\n" + >+ " protected void foo() {\n" + >+ " }\n" + >+ "}" >+ ); >+ createJavaProject("P2", new String[] {""}, new String[] {"JCL_LIB"}, new String[] {"/P1"}, ""); >+ createFolder("/P2/q"); >+ createFile( >+ "/P2/q/Y.java", >+ "package q;\n" + >+ "import p.X;\n" + >+ "public class Y extends X {\n" + >+ " void bar() {\n" + >+ " foo();\n" + >+ " }\n" + >+ "}" >+ ); >+ >+ ICompilationUnit cu = getCompilationUnit("/P1/p/X.java"); >+ IType type = cu.getType("X"); >+ IMethod method = type.getMethod("foo", new String[] {}); >+ IJavaSearchScope scope = SearchEngine.createHierarchyScope(type); >+ JavaSearchResultCollector resultCollector = new JavaSearchResultCollector(); >+ resultCollector.showProject = true; >+ new SearchEngine().search( >+ getWorkspace(), >+ method, >+ REFERENCES, >+ scope, >+ resultCollector); >+ assertEquals( >+ "q/Y.java [in P2] q.Y.bar() -> void [foo()]", > resultCollector.toString()); > } finally { > deleteProject("P1");
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 35755
:
4378
| 4379