Moved all logging and dialog functionality to the new class MessagingUtils.
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / media / MediaContentProvider.java
index bddcfbfea2434d6489214201d86b576d7ba571e0..751b345455d5e526ec16855d904121b747dab9e1 100644 (file)
@@ -27,8 +27,8 @@ import eu.etaxonomy.cdm.model.description.SpecimenDescription;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 
 /**
  * <p>MediaContentProvider class.</p>
@@ -47,7 +47,7 @@ public class MediaContentProvider implements ITreeContentProvider{
                if (parentElement instanceof TaxonEditorInput) {
                        Taxon taxon = ((TaxonEditorInput) parentElement).getTaxon();
                        if(taxon == null){
-                               EditorUtil.error(getClass(), "Taxon is null", null);
+                               MessagingUtils.error(getClass(), "Taxon is null", null);
                                return NO_CHILDREN;
                        }
                        HashSet<DescriptionBase> imageGalleries = new HashSet<DescriptionBase>();
@@ -85,7 +85,7 @@ public class MediaContentProvider implements ITreeContentProvider{
                                return derivedUnitFacadeImageGalleries.toArray();
                                
                        } catch (DerivedUnitFacadeNotSupportedException e) {
-                               EditorUtil.error(this.getClass(), "DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade", e);
+                               MessagingUtils.error(this.getClass(), "DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade", e);
                        }
                }
                
@@ -123,7 +123,7 @@ public class MediaContentProvider implements ITreeContentProvider{
                if (elements != null) {
                        // by definition, image galleries have only one description element
                        if(elements.size() > 1){
-                               EditorUtil.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null);
+                               MessagingUtils.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null);
                        }
                                                
                        DescriptionElementBase element = elements.iterator().next();