OpenDefinedTermEditorHandler : changed error dialog to warning since there is no...
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / model / CdmErrorDialog.java
index eb5a8283fef8229f65f140d039323219ebd56338..792386b585b7ef11ad73b42bc7cdf0651b3dcbb3 100644 (file)
@@ -3,32 +3,35 @@ package eu.etaxonomy.taxeditor.model;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.List;
 import org.eclipse.swt.widgets.Shell;
 
 /**
  * Error dialog class specifically implemented for the editor.
  * The main difference with {@link org.eclipse.jface.dialogs.ErrorDialog} is that
  * this dialog has a fixed max height.
- * 
+ *
  * @author cmathew
  *
  */
 public         class CdmErrorDialog extends ErrorDialog {
 
        private static final int DIALOG_MAX_HEIGHT = 500;
-       
+
        public CdmErrorDialog(Shell parentShell, String dialogTitle,
                        String message, IStatus status) {
-               super(parentShell, 
-                               dialogTitle, 
-                               message, status, 
-                               IStatus.OK| IStatus.INFO | IStatus.WARNING | IStatus.ERROR);            
-       }               
-       
+               super(parentShell,
+                               dialogTitle,
+                               message, status,
+                               IStatus.OK| IStatus.INFO | IStatus.WARNING | IStatus.ERROR);
+       }
+
        @Override
-       protected void buttonPressed(int id) {                  
+       protected void buttonPressed(int id) {
                super.buttonPressed(id);
                if (id == IDialogConstants.DETAILS_ID) {
                        Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
@@ -39,6 +42,13 @@ public       class CdmErrorDialog extends ErrorDialog {
                                getShell().setSize(getShell().getSize().x, oldSize.y);
                        }
                }
-               
-       }                                       
+
+       }
+
+       @Override
+       protected List createDropDownList(Composite parent) {
+           List list = super.createDropDownList(parent);
+           list.getMenu().getItem(0).setText(JFaceResources.getString("copy all"));
+           return list;
+       }
 }