Community
Participate
Working Groups
MA (4/19/01 6:28:32 PM) In the new class wizard, browse super types and choose an inner type AbstractButton.ForwardItemEvents The wizard gets back a IType named javax.swing.AbstractButton$ForwardItemEvents This type does not exist. NOTES: MA (4/20/01 5:39:00 PM) The type name is not valid. Checking of the type name is done with JavaConventions.validateJavaTypeName The type is received from a class file getType. The name from the type was from getFullyQualifiedTypeName (see NewClassWizardPage.chooseSupertype..) I would say the bug is that getFullyQualifiedTypeName returns a name that contains a '$' JBL (4/25/2001 6:55:56 PM) The type name is only discouraged (IStatus.WARNING). I don't think the type needs to be validated if it comes from a searchAllTypeNames request. Note that getFullyQualifiedTypeName() returns a name that contains a '$' because its a class file. We would have to open it to know the simple name of the type. Moving back to ITPJUI for consideration. MA (4/26/01 10:29:31 AM) I also discussed with TM about the full qualified name of inner types. I was thinking that the '$' is only a compiler internal thing. In source you use dot's to refer to a internal type. So shouldn't the IClassFile's name have a '$' in its name, but the contained type's full name would be dot separated? This my use case: In the new class wizard, the user can choose a inner type as superclass. The generated code whould then be class A extends pack.Outer.Inner and not class A pack.Outer$Inner Replacing all $ to dots in a name is also not really correct, as the name could contain a $ itself. JBL (4/26/2001 11:52:56 AM) Unfortunately, IType.getFullyQualifiedName() is specified as using the type-qualified name and IType.getTypeQualifiedName() is specified as using '$' as separator. Since APIs are frozen, and some customers can rely on this, it's hard to change. But you can still achieve what you want by building the '.' separated name using the declaringType and elementName recursively. MA (4/26/01 3:38:59 PM) After discussions with some people here, I am more and more coming to the insight that nobody can use type names separated with '$'. As '$' is a valid character for an id, it can't be used as a separator as well. And we really should not make the $ visible in the UI. I would vote that this too much a bug so the api should be broken. MA (4/30/01 6:19:59 PM) Added workarounds in JavaUI: JavaModelUtility.getFullyQualifiedName(IType) and JavaModelUtility.getTypeQualifiedName(IType) JW (6/4/01 3:44:36 PM) There is most likely trouble pending here. (Too much for now though). Suggest inactive? DA (6/20/01 1:21:27 PM) Problem is always true in build 0.125.
PRODUCT VERSION: smoke for 108
Will not change the current behavior.