Summary: | IType resolved key: key.toSignature has wrong format | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M7 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Martin Aeschlimann
2005-04-21 11:13:44 EDT
To change the hierarchy label provider to use the resolved key change HierarchyLabelProvider#BUG_92233_AND_92237 to false. HierarchyLabelProvider#BUG_92233_AND_92237 is currently 'true' so the resolved key is not yet used. key= "Ljava/util/Queue<TE;>;" signature= "Ljava.util.Queue<TE;>;" Changed KeyToSignature to insert the type parameters before the 'L'. Changed BindingKeyTests#test009(), test010(), test029() and test032() to reflect this change in signature format. Fix was not quite right. The signature must be: <E:>Ljava.util.Queue;. Fixed KeyToSignature#comsumeType() to create the signature with the right format. Updated BindingKeyTests#test009(), test010(), test029() and test032(). Also fixed Signature#getTypeParameters(char[]) to handle signatures with one type parameter with no bounds. I still have problems with I20050426: - set HierarchyLabelProvider#BUG_92233_AND_92237 to 'false' - open type hierarchy on List<E> key= "Ljava/lang/Iterable<TT;>;" signature= "<T:>Ljava.lang.Iterable;" Signature.getTypeParameters(signature)= { "T:" } Signature.toString("T:") -> IllegalArgumentException java.lang.IllegalArgumentException at org.eclipse.jdt.internal.core.util.Util.scanTypeVariableSignature(Util.java:2407) at org.eclipse.jdt.core.Signature.appendTypeSignature(Signature.java:2271) at org.eclipse.jdt.core.Signature.appendTypeSignature(Signature.java:2215) at org.eclipse.jdt.core.Signature.toCharArray(Signature.java:2194) at org.eclipse.jdt.core.Signature.toString(Signature.java:2642) at org.eclipse.jdt.ui.JavaElementLabels.getTypeSignatureLabel(JavaElementLabels.java:701) at org.eclipse.jdt.ui.JavaElementLabels.getTypeArgumentSignaturesLabel(JavaElementLabels.java:729) at org.eclipse.jdt.ui.JavaElementLabels.getTypeLabel(JavaElementLabels.java:792) at org.eclipse.jdt.ui.JavaElementLabels.getElementLabel(JavaElementLabels.java:397) at org.eclipse.jdt.ui.JavaElementLabels.getElementLabel(JavaElementLabels.java:362) at org.eclipse.jdt.ui.JavaElementLabels.getTextLabel(JavaElementLabels.java:345) at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getText(JavaUILabelProvider.java:161) You want to use Signature#getTypeVariable(...) with "T:" instead of Signature#toString(...) which is for type signatures, not for type parameter signatures. So a type parameter signature is not a type signature and can't be used with toString and getTypeSignatureKind. I guess I can learn that, but I have to say that thing get quit complicated now. That's right. Note the formats are different not because we want because to make it harder for you, but because this is how it is spec'ed in the JLS3. Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD. |