eclipse-gemoc / gemoc-studio-modeldebugging

gemoc-studio-modeldebugging
Eclipse Public License 1.0
6 stars 15 forks source link

add an action that changes the focus from a selected element in Xtext to the same element in sirius (or other editor) #127

Open dvojtise opened 5 years ago

dvojtise commented 5 years ago

we have example of code that open xtext editor from the sirius editor (cf. https://github.com/dvojtise/mde-crashcourse-logo/blob/master/part3-mmfirst-solution/fr.inria.sed.logo.design/src/fr/inria/sed/logo/design/Services.java)

it would be interresting to have the opposite feature too. I.e from xtext, right click on a part of the text would open a popup in order to open the sirius editor and selecting the corresponding element in the diagram(s)

szschaler commented 5 years ago

Xtext already allows following references, including to other resources, using F3 or Ctrl-Click (or the Mac equivalent). By default, this will go to the tree view for non-Xtext resources, but one can implement a helper class that opens a different editor.

dvojtise commented 5 years ago

This isn't exactly what I mean. This is not about following a reference. This is about navigating between representations.

If a given model element has several representations: in textual form and graphical (or tree), the idea would be to retrieve the same element but in one of its other representations.

The service referenced in the above comment does that from sirius to xtext.

I agree that we could also propose to open the tree editor (either a dedicated one, or the reflective one)