import java.util.List;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Status;
import eu.etaxonomy.cdm.api.service.DeleteResult;
}
+
+ public static void messageDialogWithDetails(IStatus result, String message, String pluginId) {
+
+ List<String> details = new ArrayList<String>();
+ String title= "";
+ Throwable e = null;
+ if (result.isMultiStatus()){
+ for (IStatus childStatus:result.getChildren()){
+ details.add(childStatus.getMessage());
+ }
+ e = result.getChildren()[0].getException();
+ if (result.equals(Status.OK_STATUS)|| result.equals(Status.WARNING)){
+ title = "Delete was successfull.";
+ } else {
+ title = "Delete was aborted.";
+ }
+ }
+ StringBuffer relatedObjectsString = new StringBuffer();
+ Object[] relatedObjects = new ArrayList<Object>().toArray();
+
+
+
+ String stackTraceWithContext = getContextInfo(details);
+ CdmDeleteErrorDialog ced = new CdmDeleteErrorDialog(AbstractUtility.getShell(), title, message,new Status(IStatus.INFO, pluginId, null, e), stackTraceWithContext, relatedObjects);
+
+ ced.open();
+
+
+
+ }
+
}