Skip to main content
summaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorAlain Magloire2002-11-23 04:19:12 +0000
committerAlain Magloire2002-11-23 04:19:12 +0000
commit679f9913d59117d3b36dab9b67f373a4f006a091 (patch)
tree70aa7c7f998b4d1d15ac4f941f0071d0374dd8b4 /launch
parent0a4fdc5cd3a7a1a1283b6ab498d87c259115d435 (diff)
downloadorg.eclipse.cdt-679f9913d59117d3b36dab9b67f373a4f006a091.tar.gz
org.eclipse.cdt-679f9913d59117d3b36dab9b67f373a4f006a091.tar.xz
org.eclipse.cdt-679f9913d59117d3b36dab9b67f373a4f006a091.zip
add new method erroDialog().
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
index 0aa24c3f46d..f9c13466db8 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
@@ -11,6 +11,7 @@ import org.eclipse.debug.core.DebugEvent;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IDebugEventSetListener;
import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
@@ -112,6 +113,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin
public static void log(Throwable e) {
log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, e.getMessage(), e)); //$NON-NLS-1$
}
+
/**
* Returns the active workbench window
*
@@ -128,8 +130,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin
}
return null;
}
-
-
+
/**
* Returns the active workbench shell or <code>null</code> if none
*
@@ -141,6 +142,23 @@ public class LaunchUIPlugin extends AbstractUIPlugin
return window.getShell();
}
return null;
+ }
+
+ public static void errorDialog( String message, IStatus status ) {
+ log(status);
+ Shell shell = getActiveWorkbenchShell();
+ if (shell != null) {
+ ErrorDialog.openError(shell, "Error", message, status);
+ }
+ }
+
+ public static void errorDialog(String message, Throwable t) {
+ log(t);
+ Shell shell = getActiveWorkbenchShell();
+ if (shell != null) {
+ IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), 1, t.getMessage(), null); //$NON-NLS-1$
+ ErrorDialog.openError(shell, "Error", message, status);
+ }
}
/**
* @see org.eclipse.core.runtime.Plugin#shutdown()

Back to the top