// $Id$
/**
* Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
+ * European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
- *
+ *
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
/**
- *
+ *
* @author n.hoffmann
* @created Mar 30, 2011
* @version 1.0
List<PolytomousKeyNode> children;
if (parent instanceof PolytomousKeyNode) {
+ ((PolytomousKeyNode) parent).removeNullValueFromChildren();
children = ((PolytomousKeyNode) parent).getChildren();
} else if (parent instanceof PolytomousKey) {
children = new ArrayList<PolytomousKeyNode>();
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
public DeleteNodeOperation(String label, IUndoContext undoContext,
PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled) {
super(label, undoContext, node, postOperationEnabled);
+ HibernateProxyHelper.deproxy(node, PolytomousKeyNode.class);
this.node = node;
this.parent = node.getParent();
}
IPolytomousKeyNodeService service = controller.getPolytomousKeyNodeService();
DeleteResult result;
+
if (node.getChildren().size()>0){
if(! MessageDialog.openQuestion(null, "Confirm deletion of children", "The selected node has children, do you want to delete them, too?")) {
result = service.delete(node.getUuid(), false);