|
Re: How to delete a graphical element [message #1708934 is a reply to message #1708929] |
Tue, 22 September 2015 14:43 |
|
Le 22/09/2015 16:18, Orso-Manuel Picon a écrit :
> Hi all,
Hi.
> I'm looking for a way to make all the elements of my Sirius diagram
> disappear. They should not be removed from the model, but only from the
> diagram.
> Once the diagram emptied, I could fill it using some "Selection
> Wizards", and chose which elements I want to show.
It's not an answer to your direct question, but from what you describe
it looks like what you want is to use unsynchornized mappings on your
diagram. No graphical elements are created by default for the mapping
configured like this (set "Synchronizaion: Not synchronized" in the
mappings' Advanced section), so on creation your diagrams will be blank.
Its up to you to then explicitly create views for the elements to make
visible, by invoking the "Create View" and "Create Edge View" from
inside your tools (which can be wizards or other).
Note that in general in such cases you want most node and container
mappings to be "Not synchronized", but all (or at least most) edge
mappings to keep the default setting, so that the edges you define will
become automatically visible as soon as both their source and target
are. If you have a list container, you probably want the items mappings
defined inside to be synchronized so that they also appear as soon as
the list view is created.
You can have a look at how Ecore Tools [1] is implemented, it works
exactly like this.
[1]
http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/tree/org.eclipse.emf.ecoretools.design
--
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.02348 seconds