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

Bug 331726

Summary: Selectionmechanism missing on right ShortMethodSpec Callout to field
Product: [Tools] Objectteams Reporter: Jan Marc Hoffmann <exelnet>
Component: OTDTAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 Flags: stephan.herrmann: iplog+
Version: 0.7.1   
Target Milestone: 0.8 M4   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
test & fix none

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.