cleanup
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / key / polytomous / operation / CreatePolytomousKeyNodeOperation.java
index 3d34d60cdbe3e2bf04a33080fc6a1e83f5a07838..128a7ab9e8dc7ca1e866fb0993e3b614074e915e 100644 (file)
@@ -15,29 +15,25 @@ import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
 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 cmathew
  * @date 21 Jul 2015
- *
  */
 public class CreatePolytomousKeyNodeOperation extends CdmDefaultOperation {
 
+    private final static String LABEL = Messages.RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
+
     private final PolytomousKeyNode parentNode;
     private PolytomousKeyNode childNode;
-    /**
-    *
-    */
-   protected IPostOperationEnabled postOperationEnabled;
+    private IPostOperationEnabled postOperationEnabled;
 
     public PolytomousKeyNode getChildNode() {
         return childNode;
     }
 
-    private final static String LABEL = Messages.RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
-
     public CreatePolytomousKeyNodeOperation(Object source,
             boolean async,
             PolytomousKeyNode parentNode, IPostOperationEnabled postOperationEnabled){
@@ -46,23 +42,14 @@ public class CreatePolytomousKeyNodeOperation extends CdmDefaultOperation {
         this.postOperationEnabled = postOperationEnabled;
     }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.taxeditor.operation.RemotingCdmSimpleOperation#doSimpleExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
-     */
     @Override
     protected CdmBase doSimpleExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
-      childNode = PolytomousKeyNode.NewInstance();
-      parentNode.addChild(childNode);
-      if (postOperationEnabled.postOperation(childNode)){
-          return childNode;
-      }else {
-          return null;
-      }
+        childNode = PolytomousKeyNode.NewInstance();
+        parentNode.addChild(childNode);
+        if (postOperationEnabled.postOperation(childNode)){
+            return childNode;
+        } else {
+            return null;
+        }
     }
-
-
-
-
-
-
-}
+}
\ No newline at end of file