Committing changes to definedtermeditor after merge from branch
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / model / AbstractUtility.java
index 6a18fa134f3c9f0d934a5ad68a6e9c61febf63f0..835ca848861e3ca54cf337cd585e213e8608ccf4 100644 (file)
@@ -49,6 +49,7 @@ import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.themes.ITheme;
 import org.eclipse.ui.themes.IThemeManager;
 
+import eu.etaxonomy.cdm.model.common.TermBase;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
@@ -308,6 +309,11 @@ public abstract class AbstractUtility {
                });
        }
 
+       public static void informationDialog(final String title,
+                       final IStatus status) {
+               informationDialog(title, status.getMessage());
+       }
+       
        /**
         * <p>
         * warningDialog
@@ -332,6 +338,16 @@ public abstract class AbstractUtility {
                        }
                });
        }
+       
+       /**
+        * @param title
+        * @param termBase
+        * @param status
+        */
+       public static void warningDialog(String title, Object source,
+                       IStatus status) {
+               warningDialog(title, source, status.getMessage());
+       }
 
        /**
         * <p>
@@ -745,6 +761,11 @@ public abstract class AbstractUtility {
                log(status);
        }
        
+       public static void warn(Class source, IStatus status) {
+               getLog4JLogger(source).warn(status.getMessage(), status.getException());
+               log(status);
+       }
+       
        public static void warn(Class source, Throwable t) {
                IStatus status = new Status(IStatus.WARNING, getPluginId(), t.getMessage(), t);
                getLog4JLogger(source).warn(t);
@@ -827,7 +848,7 @@ public abstract class AbstractUtility {
         * 
         * @return a {@link java.lang.String} object.
         */
-       protected static String getPluginId() {
+       public static String getPluginId() {
                return "eu.taxeditor";
        }