Bug 492342 - Support for renaming objects with EKeys in Sirius Integration with XText
Summary: Support for renaming objects with EKeys in Sirius Integration with XText
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-04-25 04:22 EDT by Koen Staal CLA
Modified: 2016-04-25 09:47 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Koen Staal CLA 2016-04-25 04:22:47 EDT
Xtext can be used in combination with an existing Ecore model, in which EObjects may use EKeys to define a unique identifier. When renaming an object through a textual Xtext editor, currently the graphical Sirius information and references are lost. As the rest of the integration seems to work fine in the case of EKeys, it would be useful to add support for renaming objects with EKeys as well.

The URI of an object without EKeys looks like my.statemachine#//@states.4 and with EKeys like my.statemachine#//@states[name='active']. In the case of EKeys, the renaming an object leads to a change in the URI of the object. See also the Xtext-Sirius presentation (https://www.eclipsecon.org/france2014/sites/default/files/slides/Xtext_Sirius.pdf) on slide 13.

When renaming an element, Sirius is notified of a Resource change. In the notification Sirius gets a new URI and therefore adds a completely new object (it does not rename the old one). All references to the object in the diagrams are lost, including their settings (position, color etc) and even diagrams of that object.

As described at https://www.eclipse.org/forums/index.php/t/1075680/, it seems not possible to add this functionality to the Xtext renaming implementation, because in this stage of the renaming process, the Sirius ResourceSet is not yet updated; the ResourceSet still identifies the object by its old URI.
Comment 1 Julien Dupont CLA 2016-04-25 09:47:19 EDT
Thanks for your enhancement submission. 

Could you give an example with reproduction scenario to reproduced problem?

We agree that it would be an interesting improvement, but we have currently not planned to work on it in the following releases. That said this issue can move forward if you provide a fix for it or contact Obeo for sponsored work.

Regards,