Community
Participate
Working Groups
When using the remove operation it is possible to delete the root element. This causes the editor to close. The model itself is not modified, however the representation is lost and the Model Explorer does not allow to expand the model`s resource anymore. A restart of Eclipse is needed to create new representations for the model. It would be nice to have a confirmation dialog either upon deletion of the root element or as an additional feature for the remove operation that can be enabled by the developer. The second solution might be preferable if there are other use-cases.
Created attachment 251578 [details] sample I added a sample to this bugzilla. It provides a diagram description that only display the model root element. On deletion the popup "Deleted root element" is opened warning that the editor will close. As you close this dialog the "Save" keybinding and button are disabled because it is linked to the active editor. However, you can still right click on the project and choose save.
Two existing implementations that could be reused (maybe only partially, as inspiration): * from UML Designer: https://github.com/ObeoNetwork/UML-Designer/blob/master/plugins/org.obeonetwork.dsl.uml2.design/src/org/obeonetwork/dsl/uml2/design/internal/dialogs/ConfirmDeletionDialog.java * from Capella: https://git.polarsys.org/c/capella/capella.git/tree/core/plugins/org.polarsys.capella.core.ui.toolkit/src/org/polarsys/capella/core/ui/toolkit/dialogs/ConfirmDeleteCapellaElementDialog.java