Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331726 - Selectionmechanism missing on right ShortMethodSpec Callout to field
Summary: Selectionmechanism missing on right ShortMethodSpec Callout to field
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 0.7.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.8 M4   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 17:15 EST by Jan Marc Hoffmann CLA
Modified: 2011-05-10 09:26 EDT (History)
0 users

See Also:
stephan.herrmann: iplog+


Attachments
test & fix (8.02 KB, patch)
2010-12-03 17:33 EST, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Marc Hoffmann CLA 2010-12-02 17:15:17 EST
Normally you can open the declaration by selecting the text of the item you would like to see the declaration of. This works fine with all elements except the right side of a short -> get short Callout. 

The cause is the wrong creation of the FieldAccessSpec object in the 
Parser.checkCalloutModifier(CalloutMappingDeclaration calloutBinding) method.

If instead of the direct creation with "new" the factory method
newFieldAccessSpec(char[] ident, long poss, TypeReference typeReference, int modifiers) is used, the SelectionParser will be able to override the factorymethod and create a SelectionOnFieldAccessSpec for selection usecases.

greetings 

Jan Marc
Comment 1 Stephan Herrmann CLA 2010-12-03 17:33:15 EST
Created attachment 184521 [details]
test & fix

This patch contains a test and the fix (plus a little cleanup regarding
the different constructors of FieldAccessSpec).

Thanks, your analysis was extremely helpful.
Comment 2 Stephan Herrmann CLA 2010-12-03 17:37:07 EST
The patch has been committed as r1117 f.
Comment 3 Stephan Herrmann CLA 2010-12-16 14:58:06 EST
Verified for M4 using build 201012150343
Comment 4 Stephan Herrmann CLA 2011-05-10 09:26:51 EDT
Setting the iplog flag to acknowledge the quasi patch in comment 0.