Bug 87362

Summary: BindingKey#internalToSignature() should return the field's type signature
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: dirk_baeumer
Version: 3.0   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 87174    

Description Martin Aeschlimann CLA 2005-03-08 07:34:44 EST
20050308

When using BindingKey to parse a key retrieved from an IField, I would like to
access the field's declared type.

A new API BindingKey#getFieldTypeSignature() would do the job (as suggested in
bug 85811)
Comment 1 Jerome Lanneluc CLA 2005-04-06 06:24:25 EDT
API is now frozen. Will consider post 3.1.
Comment 2 Martin Aeschlimann CLA 2005-04-06 06:58:20 EDT
Discussed with Dirk and we would like to suggest this bug to the PMC to be
considered an API candidate for M7. The hover is a main feature and should be
able to show resolved information also for fields. 

A non-breaking solution would be to change BindingsKey.toSignature to return the
field return type.
BindingsKey.toSignature specs: "Transforms this binding key into a signature.".
There's no field signature, but the currently returned value is the fields
parent type what is not really what one would expect either.
Comment 3 Jerome Lanneluc CLA 2005-04-06 07:01:09 EDT
I believe the key doesn't contain this information.
Comment 4 Dirk Baeumer CLA 2005-04-15 10:03:04 EDT
Jerome, can we do something here if we consider Martins idea of using the
signature. The problem is that we render "unresolved" informations in the hover.

Comment 5 Jerome Lanneluc CLA 2005-04-18 06:05:03 EDT
Yes, this would be nice to have. Note that displaying the return type is
disabled by default.
Comment 6 Martin Aeschlimann CLA 2005-04-18 06:10:34 EDT
Hovers currently always show the return type or variable type.

The outline/package explorer views allow to enable/disable return types, but
there we do not show resolved information.
Comment 7 Jerome Lanneluc CLA 2005-05-25 11:41:05 EDT
Reopening for 3.1 RC1
Comment 8 Jerome Lanneluc CLA 2005-05-25 12:30:05 EDT
Changed FieldBinding#computeUniqueKey(...) to add the field type's key.
Changed BindingKeyParser and KeyToSignature to handle this new format.
Adapted the following tests: ASTConverterTest2, ASTConverterTestAST3_2,
ASTModelBridgeTests, BatchASTCreationTests.
Added regression test BindingKeyTests#test037().
Comment 9 Martin Aeschlimann CLA 2005-05-25 13:53:50 EDT
what does that mean for us? How can I access the field type?
bidningKey.internalToSignature() ?
Comment 10 Jerome Lanneluc CLA 2005-05-25 15:37:35 EDT
Yes, BindingKey#internalToSignature() will return the signature of the field's type.
Comment 11 David Audel CLA 2005-05-27 09:31:46 EDT
Verified in i20050527-0010