Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 246359

Summary: Signature class should tell about unresolved type variable signature
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: trivial    
Priority: P3 CC: Olivier_Thomann
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Fix none

Description Markus Keller CLA 2008-09-05 09:05:10 EDT
Created attachment 111812 [details]
Fix

HEAD

Javadocs in class Signature should tell explicitly that an unresolved type variable signature is classified as CLASS_TYPE_SIGNATURE, not TYPE_VARIABLE_SIGNATURE.
Comment 1 Jerome Lanneluc CLA 2008-09-05 11:42:10 EDT
Saying that CLASS_TYPE_SIGNATURE can also correspond to a type variable looks weird to me.

I would rather deprecate getTypeSignatureKind(...) and replace it with a getTypeSignatureKind2(...) that would return UNRESOLVED_TYPE_SIGNATURE for unresolved types and unresolved type variables. What do you think?

Of course, getTypeSignatureKind2(...) is not a good name. We need to come up with something better.
Comment 2 Markus Keller CLA 2008-09-05 12:34:27 EDT
The problem is that C_UNRESOLVED already is used for unresolved type variables, so the best thing we can do for that constant, is to document that unresolved signatures can also resolve to type variables.

While reading the Javadoc of Signature again, I found that the class Javadoc also contains:
 * UnresolvedClassTypeSignature ::= // unresolved named type (in source code)

You should also add " or type variable" there.


getTypeSignatureKind2(...) also sounds good to me. This is a case like MethodDeclaration#getReturnType2(), where the original name was already right. Other new names could only be even more verbose, so adding a "2" is the best solution IMO, if the method should keep its functionality.

Another option would be to deprecate getTypeSignatureKind(...) and add a new method getSignatureKind(...), which also returns the additional kinds METHOD_SIGNATURE, FORMAL_TYPE_PARAMETER_SIGNATURE, and UNRESOLVED_TYPE_SIGNATURE.
Comment 3 Eclipse Genie CLA 2020-02-27 18:09:22 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.