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 {
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
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 &&
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