Xtendroid icon indicating copy to clipboard operation
Xtendroid copied to clipboard

Set a primary source element for elements derived by AA, otherwise navigation and UI features like find references are broken.

Open akosyakov opened this issue 9 years ago • 2 comments

See: org.eclipse.xtend.lib.macro.services.Associator.setPrimarySourceElement(MutableElement, Element)

akosyakov avatar Sep 11 '15 08:09 akosyakov

Hi,

I don't follow. What's the action that should follow from seeing that method?

Thanks.

Buggaboo avatar Sep 20 '15 15:09 Buggaboo

The API should be used, to establish associations between source elements and inferred / generated members. For instance @Accessors generated getters and setters for a field, so we use the API to associate a link between the field and the accessor methods. This information is used in the IDE for navigation.

See https://github.com/eclipse/xtext/blob/master/plugins/org.eclipse.xtend.lib/src/org/eclipse/xtend/lib/annotations/Accessors.xtend#L184

svenefftinge avatar Sep 20 '15 16:09 svenefftinge