Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Display item deletion impacts in an editor
Display item deletion impacts in an editor [message #1792907] Wed, 25 July 2018 14:22 Go to next message
Erwann Traisnel is currently offline Erwann TraisnelFriend
Messages: 14
Registered: June 2017
Junior Member

I am currently working on an Ecore model and its editor .

To make the editor more user friendly, we are currently working on item deletion.

What I would like to do is to display an "Impacts dialog " whenever I delete one or several objects, .

The "Impacts dialog" is a dialog composed of two parts:
- the left part display the model tree, highlighting the deleted items (or selecting them)
- the right part displays all the objects referencing the deleted items (hence "Impacts dialog" as it shows how the model is impacted)

My questions are :

Where and How can I short-circuit the deletion in the editor , so that it displays the dialog instead of doing the regular deletion.

Is there a dialog or an already existing solution for these needs ?


Re: Display item deletion impacts in an editor [message #1792914 is a reply to message #1792907] Wed, 25 July 2018 16:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31485
Registered: July 2009
Senior Member
The action is created by org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor.createDeleteAction() which you can override in your generated XyzActionBarContributor. You might look at org.eclipse.emf.ecore.util.EcoreUtil.deleteAll(Collection<? extends EObject>, boolean) to see how to collect all the information about which objects will be affected by the deletion, keeping in mind that deleting an object also deletes all references to all contained objects.

Ed Merks
Professional Support:
Previous Topic:What is EObjectValidator.DynamicEClassValidator good for
Next Topic:[CDO] Queries related to Standalone Client - Reg.
Goto Forum:

Current Time: Sun Sep 27 21:34:03 GMT 2020

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

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

Back to the top