Community
Participate
Working Groups
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)
API is now frozen. Will consider post 3.1.
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.
I believe the key doesn't contain this information.
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.
Yes, this would be nice to have. Note that displaying the return type is disabled by default.
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.
Reopening for 3.1 RC1
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().
what does that mean for us? How can I access the field type? bidningKey.internalToSignature() ?
Yes, BindingKey#internalToSignature() will return the signature of the field's type.
Verified in i20050527-0010