Skip to main content



      Home
Home » Modeling » EMF » Display item deletion impacts in an editor
Display item deletion impacts in an editor [message #1792907] Wed, 25 July 2018 10:22 Go to next message
Eclipse UserFriend
Hello,

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 ?

Thanks

Erwann
Re: Display item deletion impacts in an editor [message #1792914 is a reply to message #1792907] Wed, 25 July 2018 12:09 Go to previous message
Eclipse UserFriend
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.
Previous Topic:What is EObjectValidator.DynamicEClassValidator good for
Next Topic:[CDO] Queries related to Standalone Client - Reg.
Goto Forum:
  


Current Time: Wed Jul 02 22:41:09 EDT 2025

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

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

Back to the top