[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Re: shortcuts and their update functions

Hi Alex,

sorry for the late reply.

For now we have a number of problems with synchronization of a shortcuts.

I see. Are there plans to specify the sort of synchronisation for shortcuts in later releases? For instance read-only shortcuts for just showing the referenced element and write shortcuts for working with them?


Situation 1:
Model 1 contains two elements. Model 2 references a top element (the
domain
model element), which is a container for both elements, via a
shortcut. Now, the
Currently GMF allows to shortcut only top-level diagram elements from another diagrams (two elements in your example), so âdiagramâ element was visualized as a shortcut just as a side-effect of your model structure. I suppose that diagram element could be represented as a top-level nod in the same time (you have some nodemapping with the suitable EClass specified).

I've done that. The referenced element is a top-level element in the gmfmap and a node in the gmfgraph. It is the container of all other elements, hence also an compartment. The shortcut has referenced this container element. Means the node mapping is correct, but the synchronisation of it in the other model is a bit tricky.


shortcut is deleted in Model 2. A third element is drawn and created
in Model 1.
What you will see if youâll open Model1 in EMF generated editor? What type of element, where?

The newly created element is correct, with all its types and on the right position in the hierarchy. So no problem from the model side. Again, the synchronisation must be the problem.


better, when I save Model 2 with this shortcut, its current state is
also propagated to Model 1. Means, the model file contains just two

It is possible to change shortcutted element now. For example, on ECore diagram you can add a shortcut to the class from another package and then add some attribute into this class â newly added attribute will be stored in the model, so should appear on original diagram.

What do I have to do to implement a read-only shortcut, because this would be sufficient for now (ehh...probably just for me). Tweaking the EditingDomain or is there an easier way?


third one was deleted), but on the diagram, all three elements are
still drawn.
Try reopen the diagram. Generated code is not listening for external changes.

I found two possibilities:
1. Move around one element, so the diagram gets "dirty", save it and you'll have the original model.
2. Your way. Close and reopen the diagram.




Best regards,
Mathias