import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
-import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.operation.CdmDefaultOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
/**
* @author k.luther
* @date 17.11.2016
- *
*/
public class InsertPolytomousKeyNodeOperation extends CdmDefaultOperation {
- private final PolytomousKeyNode parentNode;
-
private final static String LABEL = Messages.InsertPolytomousKeyNodeOperation_INSERT_KEY;
- /**
- *
- */
- protected IPostOperationEnabled postOperationEnabled;
+ private final PolytomousKeyNode parentNode;
+
+ protected IPostOperationEnabled postOperationEnabled;
- /**
- * @param label
- * @param action
- * @param source
- * @param async
- */
public InsertPolytomousKeyNodeOperation(Object source,
boolean async,
PolytomousKeyNode parentNode, IPostOperationEnabled postOperationEnabled) {
this.postOperationEnabled = postOperationEnabled;
}
- /**
- * {@inheritDoc}
- */
@Override
protected CdmBase doSimpleExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
PolytomousKeyNode childNode = PolytomousKeyNode.NewInstance();
List<PolytomousKeyNode> newChildren = parentNode.getChildren();
- List<PolytomousKeyNode> copy = new ArrayList<PolytomousKeyNode>();
+ List<PolytomousKeyNode> copy = new ArrayList<>();
for (PolytomousKeyNode node: newChildren) {
copy.add(node);
}
this.postOperationEnabled.postOperation(childNode);
return childNode;
}
-
-}
+}
\ No newline at end of file