merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / TaxonEditorInput.java
index 2dfc5b7d6391e90d7f770b4a7a24a51e1aa7b94d..b331b88f5d9ffd68c6809371900c98d2d7e1d91b 100644 (file)
@@ -34,6 +34,7 @@ import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
 import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.DataChangeBridge;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -90,7 +91,7 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
        TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, null);
 
                if(taxonNode == null){
-                       EditorUtil.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase.");
+                       MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase.");
                        return null;
                }
 
@@ -111,14 +112,14 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
        TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
        if (taxonBase != null){
                if(taxonBase.isOrphaned()) {
-                       EditorUtil.warningDialog("Orphaned Taxon", TaxonEditorInput.class, "This is an orphaned taxon i.e. a taxon that is not connected to a classification and not having any taxonomic relationships. Editing of orphaned taxon is currently not supported.");
+                       MessagingUtils.warningDialog("Orphaned Taxon", TaxonEditorInput.class, "This is an orphaned taxon i.e. a taxon that is not connected to a classification and not having any taxonomic relationships. Editing of orphaned taxon is currently not supported.");
                }
                else if(taxonBase.isInstanceOf(Taxon.class)){
                        Taxon taxon = CdmBase.deproxy(taxonBase, Taxon.class);
        
                        if (taxon.getTaxonNodes().size() == 0 && taxon.isMisapplication()){
                                // TODO get accepted taxon
-                               EditorUtil.info("trying to open Mispplied Name ");
+                               MessagingUtils.info("trying to open Mispplied Name ");
        
                                Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
                                Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
@@ -158,7 +159,7 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
                        }
                }else if(taxonNodes.size() == 0){
                        // this is an undesired state
-                       EditorUtil.warningDialog("Incorrect state", TaxonEditorInput.class, "The accepted taxon is not part of any classification. This should not have happened.");
+                       MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "The accepted taxon is not part of any classification. This should not have happened.");
                }
        return null;
     }
@@ -176,7 +177,7 @@ public class TaxonEditorInput implements IEditorInput, IConversationEnabled, IPe
                        return getInputForMultipleNodes(conversation, taxonNodes);
                }else if(taxa.size() == 0){
                        // this is an undesired state
-                       EditorUtil.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
+                       MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
                                        " no accepted taxa are present. This should not have happened.");
                }
        return null;