import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
-import eu.etaxonomy.cdm.api.application.CdmApplicationController;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.IClassificationService;
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.api.application.CdmApplicationController;
+import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
}else if(taxonNode != null && taxonNode instanceof Classification){
Classification taxonomicTree = (Classification) taxonNode;
- if(taxonomicTree.hasChildNodes()){
- StoreUtil.warningDialog("Tree is not empty", this, "It is not possible to delete a Taxonomic Tree that " +
- "is not empty. Please delete included taxa first");
- }else{
+ /*if(taxonomicTree.hasChildNodes()){
+ if(! MessageDialog.openConfirm(null, "Confirm Deletion", "The selected tree has children, do yu realy want to delete the whole tree with its children?")){
+ return null;
+ }
+ }*/
+ try{
+ CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
+ }catch(ReferencedObjectUndeletableException e){
+ throw new ExecutionException(e.getMessage());
+ }
+
+
+ /*}else{
try{
CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
}catch(ReferencedObjectUndeletableException e){
throw new ExecutionException(e.getMessage());
}
- }
+ }*/
} else {
try {
service.deleteTaxonNodes(treeNodes, config);