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 12632 Details for
Bug 68146
Search should not populate Java model cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
org.eclipse.jdt.core_patch68146.txt (text/plain), 5.17 KB, created by
Jerome Lanneluc
on 2004-06-22 05:31:50 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2004-06-22 05:31:50 EDT
Size:
5.17 KB
patch
obsolete
>Index: model/org/eclipse/jdt/internal/core/NameLookup.java >=================================================================== >RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java,v >retrieving revision 1.56 >diff -u -r1.56 NameLookup.java >--- model/org/eclipse/jdt/internal/core/NameLookup.java 24 May 2004 17:33:41 -0000 1.56 >+++ model/org/eclipse/jdt/internal/core/NameLookup.java 22 Jun 2004 09:27:17 -0000 >@@ -114,7 +114,7 @@ > * Otherwise, false is returned. > */ > protected boolean acceptType(IType type, int acceptFlags) { >- if (acceptFlags == 0) >+ if (acceptFlags == 0 || acceptFlags == (ACCEPT_CLASSES | ACCEPT_INTERFACES)) > return true; // no flags, always accepted > try { > if (type.isClass()) { >Index: search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java >=================================================================== >RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java,v >retrieving revision 1.13 >diff -u -r1.13 ClassFileMatchLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java 20 Apr 2004 18:24:10 -0000 1.13 >+++ search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java 22 Jun 2004 09:27:17 -0000 >@@ -68,7 +68,7 @@ > int accuracy = SearchMatch.A_ACCURATE; > if (((InternalSearchPattern)pattern).mustResolve) { > try { >- BinaryTypeBinding binding = locator.cacheBinaryType(binaryType); >+ BinaryTypeBinding binding = locator.cacheBinaryType(binaryType, info); > if (binding != null) { > // filter out element not in hierarchy scope > if (!locator.typeInHierarchy(binding)) return; >Index: search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >=================================================================== >RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java,v >retrieving revision 1.186 >diff -u -r1.186 MatchLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 18 Jun 2004 11:33:46 -0000 1.186 >+++ search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 22 Jun 2004 09:27:17 -0000 >@@ -396,11 +396,22 @@ > * Returns the existing one if already cached. > * Returns null if source type binding was cached. > */ >-protected BinaryTypeBinding cacheBinaryType(IType type) throws JavaModelException { >+protected BinaryTypeBinding cacheBinaryType(IType type, IBinaryType binaryType) throws JavaModelException { > IType enclosingType = type.getDeclaringType(); > if (enclosingType != null) >- cacheBinaryType(enclosingType); // cache enclosing types first, so that binary type can be found in lookup enviroment >- IBinaryType binaryType = (IBinaryType) ((BinaryType) type).getElementInfo(); >+ cacheBinaryType(enclosingType, null); // cache enclosing types first, so that binary type can be found in lookup enviroment >+ if (binaryType == null) { >+ ClassFile classFile = (ClassFile) type.getClassFile(); >+ try { >+ binaryType = getBinaryInfo(classFile, classFile.getResource()); >+ } catch (CoreException e) { >+ if (e instanceof JavaModelException) { >+ throw (JavaModelException) e; >+ } else { >+ throw new JavaModelException(e); >+ } >+ } >+ } > BinaryTypeBinding binding = this.lookupEnvironment.cacheBinaryType(binaryType); > if (binding == null) { // it was already cached as a result of a previous query > char[][] compoundName = CharOperation.splitOn('.', type.getFullyQualifiedName().toCharArray()); >@@ -531,7 +542,7 @@ > if (!isPossibleMatch) { > if (focusType.isBinary()) { > try { >- cacheBinaryType(focusType); >+ cacheBinaryType(focusType, null); > } catch (JavaModelException e) { > return false; > } >Index: search/org/eclipse/jdt/internal/core/search/matching/SuperTypeNamesCollector.java >=================================================================== >RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/SuperTypeNamesCollector.java,v >retrieving revision 1.47 >diff -u -r1.47 SuperTypeNamesCollector.java >--- search/org/eclipse/jdt/internal/core/search/matching/SuperTypeNamesCollector.java 15 Apr 2004 22:35:48 -0000 1.47 >+++ search/org/eclipse/jdt/internal/core/search/matching/SuperTypeNamesCollector.java 22 Jun 2004 09:27:17 -0000 >@@ -153,7 +153,7 @@ > this.locator.initialize(javaProject, 0); > try { > if (this.type.isBinary()) { >- BinaryTypeBinding binding = this.locator.cacheBinaryType(this.type); >+ BinaryTypeBinding binding = this.locator.cacheBinaryType(this.type, null); > if (binding != null) > collectSuperTypeNames(binding); > } else { >@@ -203,7 +203,7 @@ > parsedUnit.traverse(new TypeDeclarationVisitor(), parsedUnit.scope); > } else if (openable instanceof IClassFile) { > IClassFile classFile = (IClassFile) openable; >- BinaryTypeBinding binding = this.locator.cacheBinaryType(classFile.getType()); >+ BinaryTypeBinding binding = this.locator.cacheBinaryType(classFile.getType(), null); > if (matches(binding)) > collectSuperTypeNames(binding); > }
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 68146
: 12632