Revision d37de08a
Added by Katja Luther over 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java | ||
---|---|---|
13 | 13 |
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration; |
14 | 14 |
import eu.etaxonomy.cdm.api.service.DeleteResult; |
15 | 15 |
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService; |
16 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
|
16 | 17 |
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode; |
17 | 18 |
import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin; |
18 | 19 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
... | ... | |
33 | 34 |
public DeleteNodeOperation(String label, IUndoContext undoContext, |
34 | 35 |
PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled) { |
35 | 36 |
super(label, undoContext, node, postOperationEnabled); |
37 |
HibernateProxyHelper.deproxy(node, PolytomousKeyNode.class); |
|
36 | 38 |
this.node = node; |
37 | 39 |
this.parent = node.getParent(); |
38 | 40 |
} |
... | ... | |
55 | 57 |
|
56 | 58 |
IPolytomousKeyNodeService service = controller.getPolytomousKeyNodeService(); |
57 | 59 |
DeleteResult result; |
60 |
|
|
58 | 61 |
if (node.getChildren().size()>0){ |
59 | 62 |
if(! MessageDialog.openQuestion(null, "Confirm deletion of children", "The selected node has children, do you want to delete them, too?")) { |
60 | 63 |
result = service.delete(node.getUuid(), false); |
Also available in: Unified diff
adaptions for polytomous key editing to avoid null values in children list