- added service method to get descriptions which have a specimen set as describedSpe...
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / derivate / contextMenu / SingleReadSequenceContextMenu.java
index 7e79e45b37f7c4d1256fd81f0f5aa701a0340691..b3164a4586ad66bf81e18c829ad23aff663db6ef 100644 (file)
@@ -20,11 +20,11 @@ import eu.etaxonomy.cdm.model.molecular.Sequence;
 import eu.etaxonomy.cdm.model.molecular.SingleRead;
 import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * Context menu for the creation of derivates in the derivate hierarchy.
+ * Context menu for the SingleReads in the derivate hierarchy.
  *
  */
 public class SingleReadSequenceContextMenu extends CompoundContributionItem {
@@ -47,8 +47,8 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
                         final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
                         final IEditorPart activeEditor = window.getActivePage().getActiveEditor();
                         final ISelection selection = window.getActivePage().getSelection();
-                        TreeNode selectedTreeNode = EditorUtil.getTreeNodeValueOfSelection(selection);
-                        TreeNode clipboardNode = EditorUtil.getTreeNodeValueOfSelection(LocalSelectionTransfer.getTransfer().getSelection());
+                        TreeNode selectedTreeNode = EditorUtil.getTreeNodeOfSelection(selection);
+                        TreeNode clipboardNode = EditorUtil.getTreeNodeOfSelection(LocalSelectionTransfer.getTransfer().getSelection());
                         if(selectedTreeNode!=null){
                             //context menu for Sequence
                             if(selectedTreeNode.getValue() instanceof Sequence
@@ -95,12 +95,12 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
             IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
             ISelection clipBoardSelection = LocalSelectionTransfer.getTransfer().getSelection();
             final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getSelection();
-            TreeNode clipBoardTreeNode = EditorUtil.getTreeNodeValueOfSelection(clipBoardSelection);
-            TreeNode selectedTreeNode = EditorUtil.getTreeNodeValueOfSelection(selection);
+            TreeNode clipBoardTreeNode = EditorUtil.getTreeNodeOfSelection(clipBoardSelection);
+            TreeNode selectedTreeNode = EditorUtil.getTreeNodeOfSelection(selection);
             switch (commandType) {
             case REMOVE_FROM_SEQUENCE:
                 if(activeEditor.isDirty()){
-                    AbstractUtility.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+                    MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
                     return;
                 }
                 if(selectedTreeNode!=null && selectedTreeNode.getParent()!=null &&
@@ -118,7 +118,7 @@ public class SingleReadSequenceContextMenu extends CompoundContributionItem {
                 break;
             case ADD_TO_SEQUENCE:
                 if(activeEditor.isDirty()){
-                    AbstractUtility.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
+                    MessagingUtils.warningDialog("View has unsaved changes", this, "You need to save before performing this action");
                     return;
                 }
                 if(clipBoardTreeNode!=null && clipBoardTreeNode.getValue() instanceof SingleRead