import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
/**
* <p>CreateTaxonNodeOperation class.</p>
@Deprecated // we do not undo creation of elements
public class CreateTaxonNode extends AbstractPersistentPostOperation {
- private Taxon newTaxon;
+ private final Taxon newTaxon;
private TaxonNode childTaxonNode;
* @param parentNode a {@link eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode} object.
* @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
*/
- public CreateTaxonNode(String label, IUndoContext undoContext,
- ITaxonTreeNode parentNode, TaxonNameBase<?, ?> name, IPostOperationEnabled postOperationEnabled,
- IConversationEnabled conversationEnabled) {
- super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled);
+ public CreateTaxonNode(String label,
+ IUndoContext undoContext,
+ ITaxonTreeNode parentNode, TaxonNameBase<?, ?> name,
+ IPostOperationEnabled postOperationEnabled,
+ IConversationEnabled conversationEnabled,
+ ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
newTaxon = Taxon.NewInstance(name, null);
}
* @param parentNode a {@link eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode} object.
* @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
*/
- public CreateTaxonNode(String label, IUndoContext undoContext,
- ITaxonTreeNode parentNode, Taxon taxon, IPostOperationEnabled postOperationEnabled,
- IConversationEnabled conversationEnabled) {
- super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled);
+ public CreateTaxonNode(String label,
+ IUndoContext undoContext,
+ ITaxonTreeNode parentNode,
+ Taxon taxon,
+ IPostOperationEnabled postOperationEnabled,
+ IConversationEnabled conversationEnabled,
+ ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ super(label, undoContext, parentNode, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
this.newTaxon = taxon;
}
return postExecute(childTaxonNode);
}catch(Exception e){
- NavigationUtil.errorDialog("Could not create taxon node", getClass(), e.getLocalizedMessage(), e);
+ MessagingUtils.messageDialog("Could not create taxon node", getClass(), e.getLocalizedMessage(), e);
return Status.CANCEL_STATUS;
}
}
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- StoreUtil.warn(this.getClass(), "Not yet implemented.");
+ MessagingUtils.warn(this.getClass(), "Not yet implemented.");
return null;
}
}