Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2010-10-21 19:22:34 +0000
committerDarin Wright2010-10-21 19:22:34 +0000
commitab73cd0ab97104e7a32d5ef1706ce7d143380f31 (patch)
treed9bce916bbd3955bbb79443fe47b7516fd5322d0 /org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java
parentb35e26213d302155b4a5809b32401af95ce9d257 (diff)
downloadeclipse.platform.debug-ab73cd0ab97104e7a32d5ef1706ce7d143380f31.tar.gz
eclipse.platform.debug-ab73cd0ab97104e7a32d5ef1706ce7d143380f31.tar.xz
eclipse.platform.debug-ab73cd0ab97104e7a32d5ef1706ce7d143380f31.zip
Bug 328295 - Launch button disabled after failed launch
Diffstat (limited to 'org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java')
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java
new file mode 100644
index 000000000..16562cdd8
--- /dev/null
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.examples.ui.midi.launcher;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+
+/**
+ * Example status handler used to open the launch dialog on a launch failure. This handler
+ * handles the '303' status code from 'org.eclipse.debug.examples.core' plug-in.
+ */
+public class ExampleLaunchStatusHandler implements IStatusHandler {
+
+ public Object handleStatus(IStatus status, Object source) throws CoreException {
+ if (source instanceof ILaunchConfigurationDialog) {
+ return null;
+ }
+ throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.debug.examples.ui", "'source' should be an instanceof ILaunchConfigrationDialog"));
+ }
+
+}

Back to the top