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 65740 Details for
Bug 185306
Help with fields and methods on binary super types with unresolved references
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
185306.txt (text/plain), 7.54 KB, created by
Philipe Mulet
on 2007-05-03 06:27:05 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2007-05-03 06:27:05 EDT
Size:
7.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java,v >retrieving revision 1.39 >diff -u -r1.39 BindingKeyResolver.java >--- model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java 14 Mar 2007 09:32:47 -0000 1.39 >+++ model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java 3 May 2007 10:27:21 -0000 >@@ -192,7 +192,7 @@ > } > > public void consumeField(char[] fieldName) { >- FieldBinding[] fields = ((ReferenceBinding) this.typeBinding).fields(); >+ FieldBinding[] fields = ((ReferenceBinding) this.typeBinding).availableFields(); // resilience > for (int i = 0, length = fields.length; i < length; i++) { > FieldBinding field = fields[i]; > if (CharOperation.equals(fieldName, field.name)) { >@@ -238,7 +238,7 @@ > } > > public void consumeMethod(char[] selector, char[] signature) { >- MethodBinding[] methods = ((ReferenceBinding) this.typeBinding).methods(); >+ MethodBinding[] methods = ((ReferenceBinding) this.typeBinding).availableMethods(); // resilience > for (int i = 0, methodLength = methods.length; i < methodLength; i++) { > MethodBinding method = methods[i]; > if (CharOperation.equals(selector, method.selector) || (selector.length == 0 && method.isConstructor())) { >@@ -339,7 +339,7 @@ > public void consumeTypeVariable(char[] position, char[] typeVariableName) { > if (position.length > 0) { > int pos = Integer.parseInt(new String(position)); >- MethodBinding[] methods = ((ReferenceBinding) this.typeBinding).methods(); >+ MethodBinding[] methods = ((ReferenceBinding) this.typeBinding).availableMethods(); // resilience > if (methods != null && pos < methods.length) { > this.methodBinding = methods[pos]; > } >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java,v >retrieving revision 1.110 >diff -u -r1.110 ReferenceBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 20 Apr 2007 23:32:43 -0000 1.110 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 3 May 2007 10:27:21 -0000 >@@ -160,9 +160,16 @@ > Arrays.sort(sortedMethods, left, right, METHOD_COMPARATOR); > } > >+/** >+ * Return the array of resolvable fields (resilience) >+ */ > public FieldBinding[] availableFields() { > return fields(); > } >+ >+/** >+ * Return the array of resolvable methods (resilience) >+ */ > public MethodBinding[] availableMethods() { > return methods(); > } >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java,v >retrieving revision 1.104 >diff -u -r1.104 BinaryTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 10 Apr 2007 19:03:10 -0000 1.104 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 3 May 2007 10:27:20 -0000 >@@ -187,6 +187,9 @@ > } > } > >+/** >+ * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#availableMethods() >+ */ > public FieldBinding[] availableFields() { > if ((this.tagBits & TagBits.AreFieldsComplete) != 0) > return fields; >@@ -212,6 +215,10 @@ > System.arraycopy(availableFields, 0, availableFields = new FieldBinding[count], 0, count); > return availableFields; > } >+ >+/** >+ * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#availableMethods() >+ */ > public MethodBinding[] availableMethods() { > if ((this.tagBits & TagBits.AreMethodsComplete) != 0) > return methods; >Index: dom/org/eclipse/jdt/core/dom/AnnotationBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotationBinding.java,v >retrieving revision 1.3 >diff -u -r1.3 AnnotationBinding.java >--- dom/org/eclipse/jdt/core/dom/AnnotationBinding.java 26 Mar 2007 17:30:24 -0000 1.3 >+++ dom/org/eclipse/jdt/core/dom/AnnotationBinding.java 3 May 2007 10:27:21 -0000 >@@ -57,7 +57,7 @@ > IMemberValuePairBinding[] pairs = getDeclaredMemberValuePairs(); > ReferenceBinding typeBinding = this.internalAnnotation.getAnnotationType(); > if (typeBinding == null) return pairs; >- MethodBinding[] methods = typeBinding.methods(); >+ MethodBinding[] methods = typeBinding.availableMethods(); // resilience > int methodLength = methods == null ? 0 : methods.length; > if (methodLength == 0) return pairs; > >Index: dom/org/eclipse/jdt/core/dom/TypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java,v >retrieving revision 1.130 >diff -u -r1.130 TypeBinding.java >--- dom/org/eclipse/jdt/core/dom/TypeBinding.java 19 Apr 2007 14:22:26 -0000 1.130 >+++ dom/org/eclipse/jdt/core/dom/TypeBinding.java 3 May 2007 10:27:21 -0000 >@@ -228,7 +228,7 @@ > try { > if (isClass() || isInterface() || isEnum()) { > ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; >- FieldBinding[] fieldBindings = referenceBinding.fields(); >+ FieldBinding[] fieldBindings = referenceBinding.availableFields(); // resilience > int length = fieldBindings.length; > if (length != 0) { > IVariableBinding[] newFields = new IVariableBinding[length]; >@@ -263,7 +263,7 @@ > try { > if (isClass() || isInterface() || isEnum()) { > ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; >- org.eclipse.jdt.internal.compiler.lookup.MethodBinding[] internalMethods = referenceBinding.methods(); >+ org.eclipse.jdt.internal.compiler.lookup.MethodBinding[] internalMethods = referenceBinding.availableMethods(); // be resilient > int length = internalMethods.length; > if (length != 0) { > int removeSyntheticsCounter = 0; >Index: search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java,v >retrieving revision 1.30 >diff -u -r1.30 ClassFileMatchLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java 6 Dec 2006 18:29:18 -0000 1.30 >+++ search/org/eclipse/jdt/internal/core/search/matching/ClassFileMatchLocator.java 3 May 2007 10:27:21 -0000 >@@ -69,7 +69,7 @@ > // filter out element not in hierarchy scope > if (!locator.typeInHierarchy(binding)) return; > >- MethodBinding[] methods = binding.methods(); >+ MethodBinding[] methods = binding.availableMethods(); // resilience > for (int i = 0, l = methods.length; i < l; i++) { > MethodBinding method = methods[i]; > if (locator.patternLocator.resolveLevel(method) == PatternLocator.ACCURATE_MATCH) { >@@ -82,7 +82,7 @@ > } > } > >- FieldBinding[] fields = binding.fields(); >+ FieldBinding[] fields = binding.availableFields(); > for (int i = 0, l = fields.length; i < l; i++) { > FieldBinding field = fields[i]; > if (locator.patternLocator.resolveLevel(field) == PatternLocator.ACCURATE_MATCH) {
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 185306
:
65740
|
65799
|
66592