MessagingUtils : added new method for a warning dialog when not connected to a datas...
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / model / MessagingUtils.java
index e9033c3925ca875a46b6840bd22b1ebcd6482f8a..e44ad8f82ec17ebc7152a31cf7070174096f8df1 100644 (file)
@@ -490,6 +490,20 @@ public class MessagingUtils {
         MessagingUtils.warningDialog(title, source, status.getMessage());
     }
 
+    /**
+     * Standard warning dialog for the case when the application is not yet connected to the datasource
+     *
+     * @param source
+     */
+    public static void noDataSourceWarningDialog(Object source) {
+        MessagingUtils
+        .warningDialog(
+                "Application is not connected to a datastore",
+                source,
+                "The requested operation is only available when "
+                + "connected to a datasource. You may choose a datasource to connect to or create a new one in the datasource view.");
+    }
+
     /**
      * Displays a warning {@link org.eclipse.jface.dialogs.MessageDialog}.
      *