Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to delete a graphical element
How to delete a graphical element [message #1708929] Tue, 22 September 2015 14:18 Go to next message
Orso-Manuel Picon is currently offline Orso-Manuel PiconFriend
Messages: 6
Registered: August 2015
Junior Member
Hi all,
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.

I guessed that the function DeleteView could be useful to solve this issue, but this function is without effect (in the way I'm using it). So any example of utilization of the "Delete View" function, or any suggestion to remove graphical elements, is strongly welcomed.

Thank you in advance,
Om.
Re: How to delete a graphical element [message #1708934 is a reply to message #1708929] Tue, 22 September 2015 14:43 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 701
Registered: July 2009
Senior Member
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
Re: How to delete a graphical element [message #1708939 is a reply to message #1708934] Tue, 22 September 2015 15:49 Go to previous message
Orso-Manuel Picon is currently offline Orso-Manuel PiconFriend
Messages: 6
Registered: August 2015
Junior Member
Thank you Pierre-Charles,
I'm indeed very helped by your indications, and by the link you gave below your message.
I will come to you if I have further issues on this topic. But for the moment I can move forward.
Greetings,
Om.
Previous Topic:java extension
Next Topic:Removing an Edge
Goto Forum:
  


Current Time: Thu Mar 28 12:57:34 GMT 2024

Powered by FUDForum. Page generated in 0.02348 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top