]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.akb.ui/src/main/java/org/argeo/slc/akb/ui/commands/DeleteAkbNodes.java
Use alias path as key to manage connectors.
[gpl/argeo-slc.git] / plugins / org.argeo.slc.akb.ui / src / main / java / org / argeo / slc / akb / ui / commands / DeleteAkbNodes.java
index 2faafa38b7ba88937d1ff8893058afffd5950437..76d8cdb5085c3ce5180c061833d1334bb1b3463f 100644 (file)
@@ -51,18 +51,18 @@ public class DeleteAkbNodes extends AbstractHandler {
                        // We must be in a template to delete nodes...
                        Node template = AkbJcrUtils.getCurrentTemplate(node);
 
-                       IEditorPart currPart = currentPage
-                                       .findEditor(new AkbNodeEditorInput(
-                                                       template.getIdentifier(), nodeJcrId));
-                       if (currPart != null)
-                               currPart.dispose();
-
                        if (node != null) {
                                Boolean ok = MessageDialog.openConfirm(
                                                HandlerUtil.getActiveShell(event), "Confirm deletion",
                                                "Do you want to delete this item?");
 
                                if (ok) {
+                                       IEditorPart currPart = currentPage
+                                                       .findEditor(new AkbNodeEditorInput(template
+                                                                       .getIdentifier(), nodeJcrId));
+                                       if (currPart != null)
+                                               currentPage.closeEditor(currPart, false);
+
                                        node.remove();
                                        session.save();
                                }