Project

General

Profile

« Previous | Next » 

Revision d31115e0

Added by Niels Hoffmann over 13 years ago

added a readme file

View differences:

taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/DeleteTreeNodeOperation.java
19 19
import org.eclipse.core.runtime.IStatus;
20 20

  
21 21
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
22
import eu.etaxonomy.cdm.model.taxon.Classification;
22 23
import eu.etaxonomy.cdm.model.taxon.ITreeNode;
23 24
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
24
import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;
25 25
import eu.etaxonomy.taxeditor.store.CdmStore;
26 26
import eu.etaxonomy.taxeditor.store.StoreUtil;
27 27

  
......
68 68
        for (ITreeNode treeNode : treeNodes){
69 69
			if(treeNode instanceof TaxonNode){
70 70
				((TaxonNode) treeNode).delete();
71
			}else if(treeNode instanceof TaxonomicTree){
72
				TaxonomicTree taxonomicTree = (TaxonomicTree) treeNode;
71
			}else if(treeNode instanceof Classification){
72
				Classification taxonomicTree = (Classification) treeNode;
73 73
				if(taxonomicTree.hasChildNodes()){
74 74
					StoreUtil.warningDialog("Tree is not empty", this, "It is not possible to delete a Taxonomic Tree that " +
75 75
							"is not empty. Please delete included taxa first");
76 76
				}else{
77
					CdmStore.getTaxonTreeService().delete(taxonomicTree);
77
					CdmStore.getClassificationService().delete(taxonomicTree);
78 78
				}
79 79
			}
80 80
		}

Also available in: Unified diff