Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorJohn Dallaway2018-09-27 11:28:14 +0000
committerJohn Dallaway2018-09-27 11:33:07 +0000
commit87cd426861eac3a38a1d79f575d6002dd63e8f5f (patch)
treede3129c08493aa80fe77ce44110053f101b1e7b6 /dsf
parent70a03a862e263385e253d11699859d1c5dab7895 (diff)
downloadorg.eclipse.cdt-87cd426861eac3a38a1d79f575d6002dd63e8f5f.tar.gz
org.eclipse.cdt-87cd426861eac3a38a1d79f575d6002dd63e8f5f.tar.xz
org.eclipse.cdt-87cd426861eac3a38a1d79f575d6002dd63e8f5f.zip
Bug 539455: Report debug command errors via status handler
Change-Id: I4c3abbb660e426580ce8f836e6e19a897fbaeefe Signed-off-by: John Dallaway <john@dallaway.org.uk>
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java21
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java21
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java11
4 files changed, 45 insertions, 10 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF b/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF
index b777a2a7a2c..bf1ea0c54e2 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF
+++ b/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.dsf.ui;singleton:=true
-Bundle-Version: 2.5.0.qualifier
+Bundle-Version: 2.5.1.qualifier
Bundle-Activator: org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java
index 44f089339ca..2ecad94b5b1 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 Wind River Systems and others.
+ * Copyright (c) 2006, 2018 Wind River Systems 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
@@ -8,14 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Marc Khouzam (Ericsson) - Added support for multi-selection (Bug 330974)
+ * John Dallaway - Report command execution error (Bug 539455)
*******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui.actions;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.Immutable;
-import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.debug.service.IMultiRunControl;
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
@@ -108,7 +109,13 @@ public class DsfResumeCommand implements IResumeHandler {
return;
}
- multiRun.resume(getContexts(), new ImmediateRequestMonitor());
+ multiRun.resume(getContexts(), new ImmediateRequestMonitor() {
+ @Override
+ protected void handleError() {
+ super.handleError();
+ CDebugUtils.error(getStatus(), DsfResumeCommand.this);
+ }
+ });
}
});
return false;
@@ -117,7 +124,13 @@ public class DsfResumeCommand implements IResumeHandler {
private void executeSingle(IDebugCommandRequest request) {
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
@Override public void doExecute() {
- getRunControl().resume(getContext(), new RequestMonitor(fExecutor, null));
+ getRunControl().resume(getContext(), new ImmediateRequestMonitor() {
+ @Override
+ protected void handleError() {
+ super.handleError();
+ CDebugUtils.error(getStatus(), DsfResumeCommand.this);
+ }
+ });
}
});
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java
index 30a9f538e4e..2e8dfe01205 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 Wind River Systems and others.
+ * Copyright (c) 2006, 2018 Wind River Systems 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
@@ -8,14 +8,15 @@
* Contributors:
* Wind River Systems - initial API and implementation
* Marc Khouzam (Ericsson) - Added support for multi-selection (Bug 330974)
+ * John Dallaway - Report command execution error (Bug 539455)
*******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui.actions;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.Immutable;
-import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.debug.service.IMultiRunControl;
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
@@ -107,7 +108,13 @@ public class DsfSuspendCommand implements ISuspendHandler {
return;
}
- multiRun.suspend(getContexts(), new ImmediateRequestMonitor());
+ multiRun.suspend(getContexts(), new ImmediateRequestMonitor() {
+ @Override
+ protected void handleError() {
+ super.handleError();
+ CDebugUtils.error(getStatus(), DsfSuspendCommand.this);
+ }
+ });
}
});
return false;
@@ -116,7 +123,13 @@ public class DsfSuspendCommand implements ISuspendHandler {
private void executeSingle(IDebugCommandRequest request) {
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
@Override public void doExecute() {
- getRunControl().suspend(getContext(), new RequestMonitor(fExecutor, null));
+ getRunControl().suspend(getContext(), new ImmediateRequestMonitor() {
+ @Override
+ protected void handleError() {
+ super.handleError();
+ CDebugUtils.error(getStatus(), DsfSuspendCommand.this);
+ }
+ });
}
});
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java
index b0c601992e8..7476b2cfa7c 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2016 Wind River Systems and others.
+ * Copyright (c) 2006, 2018 Wind River Systems 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Wind River Systems - initial API and implementation
+ * John Dallaway - Report command execution error (Bug 539455)
*******************************************************************************/
package org.eclipse.cdt.dsf.debug.ui.viewmodel;
@@ -20,6 +21,8 @@ import java.util.Map;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
+
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
@@ -453,6 +456,12 @@ public final class SteppingController {
}
super.handleFailure();
}
+
+ @Override
+ protected void handleError() {
+ super.handleError();
+ CDebugUtils.error(getStatus(), SteppingController.this);
+ }
});
}

Back to the top