Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-04-25 15:02:47 +0000
committerUwe Stieber2012-04-25 15:02:47 +0000
commit45c374773adf6196ad239a74944b529125e53e0b (patch)
treef7c0ffab7da91a5ffbba2627099934ce3107fdcd /target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler
parentb313ea83b6c978f07a037d9db849fd47b999ef86 (diff)
downloadorg.eclipse.tcf-45c374773adf6196ad239a74944b529125e53e0b.tar.gz
org.eclipse.tcf-45c374773adf6196ad239a74944b529125e53e0b.tar.xz
org.eclipse.tcf-45c374773adf6196ad239a74944b529125e53e0b.zip
Target Explorer: Fix QUESTION and YES_NO_CANCEL status handler cases
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java76
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java76
3 files changed, 154 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF
index bf79e3f88..ce5992bdb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/META-INF/MANIFEST.MF
@@ -15,4 +15,5 @@ Export-Package: org.eclipse.tcf.te.runtime.statushandler,
org.eclipse.tcf.te.runtime.statushandler.activator;x-internal:=true,
org.eclipse.tcf.te.runtime.statushandler.interfaces,
org.eclipse.tcf.te.runtime.statushandler.internal;x-internal:=true,
- org.eclipse.tcf.te.runtime.statushandler.nls
+ org.eclipse.tcf.te.runtime.statushandler.nls,
+ org.eclipse.tcf.te.runtime.statushandler.status
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java
new file mode 100644
index 000000000..c9f03416e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.statushandler.status;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+
+/**
+ * Special status implementation to handle questions.
+ * <p>
+ * <b>Note:</b>
+ * <ul>
+ * <li>{@link #getSeverity()} will always return {@link IStatusHandlerConstants#QUESTION}</li>
+ * <li>{@link #setSeverity(int)} will be ignored</li>
+ * </ul>
+ */
+public class QuestionStatus extends Status {
+
+ /**
+ * Constructor.
+ *
+ * @param pluginId The unique plugin id.
+ * @param message The message.
+ */
+ public QuestionStatus(String pluginId, String message) {
+ super(IStatus.OK, pluginId, message);
+
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param pluginId The unique plugin id.
+ * @param message The message.
+ * @param exception The exception.
+ */
+ public QuestionStatus(String pluginId, String message, Throwable exception) {
+ super(IStatus.OK, pluginId, message, exception);
+
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param pluginId The unique plugin id.
+ * @param code The code.
+ * @param message The message.
+ * @param exception The exception.
+ */
+ public QuestionStatus(String pluginId, int code, String message, Throwable exception) {
+ super(IStatus.OK, pluginId, code, message, exception);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.Status#getSeverity()
+ */
+ @Override
+ public final int getSeverity() {
+ return IStatusHandlerConstants.QUESTION;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.Status#setSeverity(int)
+ */
+ @Override
+ protected final void setSeverity(int severity) {
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java
new file mode 100644
index 000000000..56750620b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.statushandler.status;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
+
+/**
+ * Special status implementation to handle questions.
+ * <p>
+ * <b>Note:</b>
+ * <ul>
+ * <li>{@link #getSeverity()} will always return {@link IStatusHandlerConstants#YES_NO_CANCEL}</li>
+ * <li>{@link #setSeverity(int)} will be ignored</li>
+ * </ul>
+ */
+public class YesNoCancelStatus extends Status {
+
+ /**
+ * Constructor.
+ *
+ * @param pluginId The unique plugin id.
+ * @param message The message.
+ */
+ public YesNoCancelStatus(String pluginId, String message) {
+ super(IStatus.OK, pluginId, message);
+
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param pluginId The unique plugin id.
+ * @param message The message.
+ * @param exception The exception.
+ */
+ public YesNoCancelStatus(String pluginId, String message, Throwable exception) {
+ super(IStatus.OK, pluginId, message, exception);
+
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param pluginId The unique plugin id.
+ * @param code The code.
+ * @param message The message.
+ * @param exception The exception.
+ */
+ public YesNoCancelStatus(String pluginId, int code, String message, Throwable exception) {
+ super(IStatus.OK, pluginId, code, message, exception);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.Status#getSeverity()
+ */
+ @Override
+ public final int getSeverity() {
+ return IStatusHandlerConstants.YES_NO_CANCEL;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.Status#setSeverity(int)
+ */
+ @Override
+ protected final void setSeverity(int severity) {
+ }
+}

Back to the top