cleanup
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / model / CdmErrorDialog.java
index 9d33e2a124d598eae1deb25ccde3a9571b38e96b..8e39946ecd94d5e2ef9b35b8907a82e32766c52a 100644 (file)
@@ -47,14 +47,21 @@ public      class CdmErrorDialog extends ErrorDialog {
             String dialogTitle,
             String message,
             IStatus status,
-            String stackTrace) {
+            String stackTrace,
+            boolean showStatusMessage) {
         super(parentShell,
                 dialogTitle,
                 message, status,
                 IStatus.OK| IStatus.INFO | IStatus.WARNING | IStatus.ERROR);
         this.stackTrace = stackTrace;
+        String statusMessage = "";
+        if(showStatusMessage) {
+            statusMessage = status.getMessage();
+        }
+        this.message = message == null ? statusMessage : message + "\n " + statusMessage;
     }
 
+
     /**
      * @param parentShell
      * @param dialogTitle
@@ -65,7 +72,7 @@ public        class CdmErrorDialog extends ErrorDialog {
             String dialogTitle,
             String message,
             IStatus status) {
-        this(parentShell, dialogTitle, message, status, "");
+        this(parentShell, dialogTitle, message, status, "", true);
     }
 
        /* (non-Javadoc)
@@ -136,4 +143,6 @@ public      class CdmErrorDialog extends ErrorDialog {
                        new Transfer[] { TextTransfer.getInstance() });
            }
        }
+
+
 }