Xtendroid
Xtendroid copied to clipboard
Set a primary source element for elements derived by AA, otherwise navigation and UI features like find references are broken.
See: org.eclipse.xtend.lib.macro.services.Associator.setPrimarySourceElement(MutableElement, Element)
Hi,
I don't follow. What's the action that should follow from seeing that method?
Thanks.
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