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 34488 Details for
Bug 98684
[search] Code assist shown inner types of unreleated project
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
New patch to fix this issue
v00.txt (text/plain), 9.72 KB, created by
Frederic Fusier
on 2006-02-10 03:54:24 EST
(
hide
)
Description:
New patch to fix this issue
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2006-02-10 03:54:24 EST
Size:
9.72 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java,v >retrieving revision 1.28 >diff -u -r1.28 BasicSearchEngine.java >--- search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java 26 Jan 2006 15:31:04 -0000 1.28 >+++ search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java 10 Feb 2006 08:48:02 -0000 >@@ -629,6 +629,7 @@ > if (copies != null) { > for (int i = 0, length = copies.length; i < length; i++) { > ICompilationUnit workingCopy = copies[i]; >+ if (!scope.encloses(workingCopy)) continue; > final String path = workingCopy.getPath().toString(); > if (workingCopy.isConsistent()) { > IPackageDeclaration[] packageDeclarations = workingCopy.getPackageDeclarations(); >Index: search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java,v >retrieving revision 1.46 >diff -u -r1.46 JavaSearchScope.java >--- search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java 23 Jan 2006 10:34:45 -0000 1.46 >+++ search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java 10 Feb 2006 08:48:02 -0000 >@@ -210,8 +210,13 @@ > add(relativePath, containerPathToString, true/*package*/, null); > } else { > IResource resource = element.getResource(); >- if (resource != null && resource.isAccessible()) { >- containerPath = root.getKind() == IPackageFragmentRoot.K_SOURCE ? root.getParent().getPath() : root.getPath(); >+ if (resource != null) { >+ if (resource.isAccessible()) { >+ containerPath = root.getKind() == IPackageFragmentRoot.K_SOURCE ? root.getParent().getPath() : root.getPath(); >+ } else { >+ // for working copies, get resource container full path >+ containerPath = resource.getParent().getFullPath(); >+ } > containerPathToString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString(); > String relativePath = Util.relativePath(resource.getFullPath(), containerPath.segmentCount()); > add(relativePath, containerPathToString, true/*package*/, null); >#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.62 >diff -u -r1.62 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 6 Feb 2006 12:08:11 -0000 1.62 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 10 Feb 2006 08:48:08 -0000 >@@ -45,7 +45,7 @@ > static { > // org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true; > // org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true; >-// TESTS_PREFIX = "testBug110336"; >+// TESTS_PREFIX = "testBug110060"; > // TESTS_NAMES = new String[] { "testBug126330" }; > // TESTS_NUMBERS = new int[] { 124469 }; > // TESTS_RANGE = new int[] { 83304, -1 }; >@@ -4539,7 +4539,7 @@ > "AA".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4563,7 +4563,7 @@ > "AA".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4587,7 +4587,7 @@ > "AA".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4611,7 +4611,7 @@ > "AA".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4635,7 +4635,7 @@ > "AA".toCharArray(), > SearchPattern.R_PREFIX_MATCH, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4657,7 +4657,7 @@ > "AA".toCharArray(), > SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4678,7 +4678,7 @@ > "AA".toCharArray(), > SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4700,7 +4700,7 @@ > "aa".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4721,7 +4721,7 @@ > "aa".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4743,7 +4743,7 @@ > "aa".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4764,7 +4764,7 @@ > "aa".toCharArray(), > SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4785,7 +4785,7 @@ > "aa".toCharArray(), > SearchPattern.R_PREFIX_MATCH, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4807,7 +4807,7 @@ > "aa".toCharArray(), > SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >@@ -4828,7 +4828,7 @@ > "aa".toCharArray(), > SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, > TYPE, >- getJavaSearchScope(), >+ getJavaSearchScopeBugs(), > requestor, > IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, > null >Index: src/org/eclipse/jdt/core/tests/model/WorkingCopySearchTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopySearchTests.java,v >retrieving revision 1.28 >diff -u -r1.28 WorkingCopySearchTests.java >--- src/org/eclipse/jdt/core/tests/model/WorkingCopySearchTests.java 15 Jun 2005 11:53:26 -0000 1.28 >+++ src/org/eclipse/jdt/core/tests/model/WorkingCopySearchTests.java 10 Feb 2006 08:48:08 -0000 >@@ -16,6 +16,7 @@ > import org.eclipse.core.runtime.IPath; > import org.eclipse.jdt.core.ICompilationUnit; > import org.eclipse.jdt.core.IJavaElement; >+import org.eclipse.jdt.core.IJavaProject; > import org.eclipse.jdt.core.IMethod; > import org.eclipse.jdt.core.IType; > import org.eclipse.jdt.core.JavaModelException; >@@ -33,7 +34,7 @@ > // All specified tests which do not belong to the class are skipped... > static { > // TESTS_PREFIX = "testAllTypeNames"; >-// TESTS_NAMES = new String[] { "testAllTypeNamesBug99915" }; >+// TESTS_NAMES = new String[] { "testAllTypeNamesBug98684" }; > // TESTS_NUMBERS = new int[] { 8 }; > // TESTS_RANGE = new int[] { -1, -1 }; > } >@@ -278,7 +279,57 @@ > "wc.AAABBB", > requestor); > } >- >+ >+ /** >+ * Bug 98684: [1.5][search] Refactoring: renaming of field of a (complex) parametrized type does not replace all occurrences >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=98684" >+ */ >+ public void testAllTypeNamesBug98684() throws CoreException { >+ try { >+ IJavaProject[] projects = new IJavaProject[2]; >+ projects[0] = createJavaProject("P1"); >+ projects[1] = createJavaProject("P2"); >+ workingCopies = new ICompilationUnit[2]; >+ workingCopies[0] = getWorkingCopy("/P1/p1/A1.java", >+ "package p1;\n" + >+ "public class A1 {\n" + >+ " public static class A1Inner1 {}" + >+ " public static class A1Inner2 {}" + >+ "}" >+ ); >+ workingCopies[1] = getWorkingCopy("/P2/p2/A2.java", >+ "package p2;\n" + >+ "public class A2 {\n" + >+ " public static class A2Inner2 {}" + >+ " public static class A2Inner2 {}" + >+ "}" >+ ); >+ TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); >+ IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] { projects[1] }); >+ new SearchEngine(this.workingCopies).searchAllTypeNames( >+ null, >+ "A".toCharArray(), >+ SearchPattern.R_PREFIX_MATCH, >+ TYPE, >+ scope, >+ requestor, >+ IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, >+ null >+ ); >+ this.discard = false; >+ assertSearchResults( >+ "Unexpected all type names", >+ "p2.A2\n" + >+ "p2.A2$A2Inner2\n" + >+ "p2.A2$A2Inner2", >+ requestor); >+ } >+ finally { >+ deleteProject("P1"); >+ deleteProject("P2"); >+ } >+ } >+ > /** > * Declaration of referenced types test. > * (Regression test for bug 5355 search: NPE in searchDeclarationsOfReferencedTypes )
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 98684
:
34358
| 34488