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 26692 Details for
Bug 102284
[5.0 ] CCE in ParameterizedTypeBinding [code assist]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Proposed patch
patchjdtcore001.txt (text/plain), 2.98 KB, created by
David Audel
on 2005-08-31 07:39:01 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
David Audel
Created:
2005-08-31 07:39:01 EDT
Size:
2.98 KB
patch
obsolete
>Index: codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java,v >retrieving revision 1.47 >diff -u -r1.47 Engine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java 15 Jun 2005 13:08:06 -0000 1.47 >+++ codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java 31 Aug 2005 11:31:23 -0000 >@@ -316,29 +316,12 @@ > } > > public static char[] getTypeSignature(TypeBinding typeBinding) { >- if(typeBinding.isLocalType()) { >- LocalTypeBinding localTypeBinding = (LocalTypeBinding)typeBinding; >- if(localTypeBinding.isAnonymousType()) { >- typeBinding = localTypeBinding.superclass(); >- } else { >- localTypeBinding.setConstantPoolName(typeBinding.sourceName()); >- } >- } > return typeBinding.signature(); > } > public static char[] getSignature(Binding binding) { > char[] result = null; > if ((binding.kind() & Binding.TYPE) != 0) { > TypeBinding typeBinding = (TypeBinding)binding; >- if(typeBinding.isLocalType()) { >- LocalTypeBinding localTypeBinding = (LocalTypeBinding)typeBinding; >- if(localTypeBinding.isAnonymousType()) { >- typeBinding = localTypeBinding.superclass(); >- } else { >- // TODO (david) this code is not necessary any longer (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=99686) >- localTypeBinding.setConstantPoolName(typeBinding.sourceName()); >- } >- } > result = typeBinding.genericTypeSignature(); > } else if ((binding.kind() & Binding.METHOD) != 0) { > MethodBinding methodBinding = (MethodBinding)binding; >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java,v >retrieving revision 1.38 >diff -u -r1.38 LocalTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java 25 Aug 2005 11:13:09 -0000 1.38 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java 31 Aug 2005 11:31:24 -0000 >@@ -188,7 +188,20 @@ > public void setConstantPoolName(char[] computedConstantPoolName) /* java/lang/Object */ { > this.constantPoolName = computedConstantPoolName; > } >- >+/* >+ * Overriden for code assist. In this case, the constantPoolName() has not been computed yet. >+ * Slam the source name so that the signature is syntactically correct. >+ * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=102284) >+ */ >+public char[] signature() { >+ if (this.signature == null && constantPoolName() == null) { >+ if (isAnonymousType()) >+ setConstantPoolName(superclass().sourceName()); >+ else >+ setConstantPoolName(sourceName()); >+ } >+ return super.signature(); >+} > public char[] sourceName() { > if (isAnonymousType()) { > if (superInterfaces == NoSuperInterfaces)
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 Raw
Actions:
View
Attachments on
bug 102284
: 26692 |
26797
|
26798