diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/AbstractExpressionVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/AbstractExpressionVMNode.java index 86c6a6bf1da..924526a295c 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/AbstractExpressionVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/AbstractExpressionVMNode.java @@ -16,11 +16,11 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.MultiRequestMonitor; import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.debug.internal.ui.DsfDebugUIPlugin; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.concurrent.ViewerDataRequestMonitor; import org.eclipse.dd.dsf.ui.viewmodel.VMChildrenUpdate; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMNode; @@ -42,7 +42,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode public void update(final IExpressionUpdate update) { if (!canParseExpression(update.getExpression())) { - update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Invalid expression", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Invalid expression", null)); //$NON-NLS-1$ update.done(); return; } @@ -53,7 +53,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode @Override protected void handleOK() { if (getData().size() == 0) { - update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "No contexts", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "No contexts", null)); //$NON-NLS-1$ update.done(); } else { final List elements = getData(); @@ -73,7 +73,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode } } if (!foundMatchingContext) { - update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Context not found", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Context not found", null)); //$NON-NLS-1$ } } else { update.setStatus(getStatus()); @@ -97,7 +97,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode } @Override - protected void handleErrorOrCancel() { + protected void handleCancelOrErrorOrWarning() { update.setStatus(getStatus()); update.done(); } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderContentStragegy.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderContentStragegy.java index 1488f99f368..ab1afc9f400 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderContentStragegy.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderContentStragegy.java @@ -12,8 +12,8 @@ package org.eclipse.dd.dsf.debug.ui.viewmodel.expression; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.debug.internal.ui.DsfDebugUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.concurrent.ViewerDataRequestMonitor; import org.eclipse.dd.dsf.ui.viewmodel.DefaultVMContentProviderStrategy; @@ -40,7 +40,7 @@ public class ExpressionVMProviderContentStragegy extends DefaultVMContentProvide if (matchingNode != null) { updateExpressionWithNode(matchingNode, update); } else { - update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "Cannot parse expression", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Cannot parse expression", null)); //$NON-NLS-1$ update.done(); } } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderModelProxyStrategy.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderModelProxyStrategy.java index 6cc7480e085..4c7a5686ef9 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderModelProxyStrategy.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/ExpressionVMProviderModelProxyStrategy.java @@ -96,7 +96,7 @@ public class ExpressionVMProviderModelProxyStrategy extends DefaultVMModelProxyS } @Override - protected void handleError() { + protected void handleErrorOrWarning() { // Avoid propagating the error to avoid processing the delta by // all nodes. rm.done(); diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/VMExpressionUpdate.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/VMExpressionUpdate.java index beb74d991f4..6408819022a 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/VMExpressionUpdate.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/expression/VMExpressionUpdate.java @@ -13,8 +13,8 @@ package org.eclipse.dd.dsf.debug.ui.viewmodel.expression; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.internal.ui.DsfUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.VMViewerUpdate; import org.eclipse.debug.core.model.IExpression; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; @@ -72,7 +72,7 @@ class VMExpressionUpdate extends VMViewerUpdate implements IExpressionUpdate { if (fExpressionElement != null) { rm.setData(fExpressionElement); } else if (rm.getStatus().isOK()) { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$ } super.done(); } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/LaunchRootVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/LaunchRootVMNode.java index d3e1ea62a3c..bd39dd7271f 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/LaunchRootVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/LaunchRootVMNode.java @@ -16,8 +16,8 @@ import java.util.List; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.debug.internal.ui.DsfDebugUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.AbstractVMProvider; import org.eclipse.dd.dsf.ui.viewmodel.IRootVMNode; import org.eclipse.dd.dsf.ui.viewmodel.RootVMNode; @@ -89,7 +89,7 @@ public class LaunchRootVMNode extends RootVMNode @Override public void createRootDelta(Object rootObject, Object event, final DataRequestMonitor rm) { if (!(rootObject instanceof ILaunch)) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Invalid root element configured with launch root node.", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Invalid root element configured with launch root node.", null)); //$NON-NLS-1$ return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java index 9ffd46cff9e..79a1a044694 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java @@ -15,6 +15,7 @@ import java.util.concurrent.RejectedExecutionException; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.debug.service.IRunControl; @@ -28,7 +29,6 @@ import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason; import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext; import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMData; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.IVMContext; import org.eclipse.dd.dsf.ui.viewmodel.ModelProxyInstalledEvent; import org.eclipse.dd.dsf.ui.viewmodel.VMChildrenUpdate; @@ -191,8 +191,8 @@ public class StackFramesVMNode extends AbstractDMVMNode */ if (!getStatus().isOK()) { assert getStatus().isOK() || - getStatus().getCode() != IDsfService.INTERNAL_ERROR || - getStatus().getCode() != IDsfService.NOT_SUPPORTED; + getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || + getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; handleFailedUpdate(update); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModuleDetailPane.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModuleDetailPane.java index f8a099b75a7..94db474de94 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModuleDetailPane.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModuleDetailPane.java @@ -24,6 +24,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Query; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.datamodel.IDMContext; @@ -34,7 +35,6 @@ import org.eclipse.dd.dsf.debug.service.IModules.IModuleDMContext; import org.eclipse.dd.dsf.debug.service.IModules.IModuleDMData; import org.eclipse.dd.dsf.service.DsfServicesTracker; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.IDMVMContext; import org.eclipse.debug.core.model.IDebugElement; import org.eclipse.debug.internal.ui.DebugUIPlugin; @@ -525,7 +525,7 @@ public class ModuleDetailPane extends AbstractDetailPane implements IAdaptable, DsfServicesTracker tracker = new DsfServicesTracker(DsfDebugUIPlugin.getBundleContext(), fDmc.getSessionId()); IModules service = tracker.getService(IModules.class); if (service == null) { - rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModulesVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModulesVMNode.java index 9cccf07505d..3d00a73fbb8 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModulesVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/modules/ModulesVMNode.java @@ -14,6 +14,7 @@ import java.util.concurrent.RejectedExecutionException; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.debug.internal.ui.DsfDebugUIPlugin; import org.eclipse.dd.dsf.debug.service.IModules; @@ -23,7 +24,6 @@ import org.eclipse.dd.dsf.debug.service.IModules.IModuleDMData; import org.eclipse.dd.dsf.debug.service.IModules.ISymbolDMContext; import org.eclipse.dd.dsf.debug.ui.IDsfDebugUIConstants; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.VMDelta; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMNode; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; @@ -99,8 +99,8 @@ public class ModulesVMNode extends AbstractDMVMNode */ if (!getStatus().isOK()) { assert getStatus().isOK() || - getStatus().getCode() != IDsfService.INTERNAL_ERROR || - getStatus().getCode() != IDsfService.NOT_SUPPORTED; + getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || + getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; handleFailedUpdate(update); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldVMNode.java index bf368b39e59..fb47d5a9fa9 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldVMNode.java @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.datamodel.IDMContext; @@ -39,7 +40,6 @@ import org.eclipse.dd.dsf.debug.ui.viewmodel.numberformat.IFormattedValuePrefere import org.eclipse.dd.dsf.debug.ui.viewmodel.numberformat.IFormattedValueVMContext; import org.eclipse.dd.dsf.debug.ui.viewmodel.register.RegisterBitFieldCellModifier.BitFieldEditorStyle; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.IVMContext; import org.eclipse.dd.dsf.ui.viewmodel.VMDelta; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; @@ -292,8 +292,8 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode */ if (!getStatus().isOK()) { assert getStatus().isOK() || - getStatus().getCode() != IDsfService.INTERNAL_ERROR || - getStatus().getCode() != IDsfService.NOT_SUPPORTED; + getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || + getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; handleFailedUpdate(update); return; } @@ -375,7 +375,7 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode regDmc, new DataRequestMonitor(getSession().getExecutor(), null) { @Override - protected void handleErrorOrCancel() { + protected void handleCancelOrErrorOrWarning() { handleFailedUpdate(update); } @@ -514,14 +514,14 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode @Override protected void testElementForExpression(Object element, IExpression expression, DataRequestMonitor rm) { if (!(element instanceof IDMVMContext)) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ rm.done(); return; } final IBitFieldDMContext dmc = DMContexts.getAncestorOfType(((IDMVMContext)element).getDMContext(), IBitFieldDMContext.class); if (dmc == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupVMNode.java index 835a6e7731e..e7911b2c9f9 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterGroupVMNode.java @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.datamodel.IDMContext; @@ -30,7 +31,6 @@ import org.eclipse.dd.dsf.debug.ui.viewmodel.IDebugVMConstants; import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.AbstractExpressionVMNode; import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.WatchExpressionCellModifier; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.IVMContext; import org.eclipse.dd.dsf.ui.viewmodel.VMDelta; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; @@ -187,8 +187,8 @@ public class RegisterGroupVMNode extends AbstractExpressionVMNode */ if (!getStatus().isOK()) { assert getStatus().isOK() || - getStatus().getCode() != IDsfService.INTERNAL_ERROR || - getStatus().getCode() != IDsfService.NOT_SUPPORTED; + getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || + getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; handleFailedUpdate(update); return; } @@ -330,13 +330,13 @@ public class RegisterGroupVMNode extends AbstractExpressionVMNode @Override protected void testElementForExpression(Object element, IExpression expression, DataRequestMonitor rm) { if (!(element instanceof IDMVMContext)) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ rm.done(); return; } final IRegisterGroupDMContext dmc = DMContexts.getAncestorOfType(((IDMVMContext)element).getDMContext(), IRegisterGroupDMContext.class); if (dmc == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterVMNode.java index 1a35a3efe39..3596e91412f 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterVMNode.java @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.datamodel.IDMContext; @@ -35,7 +36,6 @@ import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.AbstractExpressionVMNode import org.eclipse.dd.dsf.debug.ui.viewmodel.numberformat.IFormattedValuePreferenceStore; import org.eclipse.dd.dsf.debug.ui.viewmodel.numberformat.IFormattedValueVMContext; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.IVMContext; import org.eclipse.dd.dsf.ui.viewmodel.VMDelta; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; @@ -292,8 +292,8 @@ public class RegisterVMNode extends AbstractExpressionVMNode */ if (!getStatus().isOK()) { assert getStatus().isOK() || - getStatus().getCode() != IDsfService.INTERNAL_ERROR || - getStatus().getCode() != IDsfService.NOT_SUPPORTED; + getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || + getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; handleFailedUpdate(update); return; } @@ -487,13 +487,13 @@ public class RegisterVMNode extends AbstractExpressionVMNode @Override protected void testElementForExpression(Object element, IExpression expression, DataRequestMonitor rm) { if (!(element instanceof IDMVMContext)) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ rm.done(); return; } final IRegisterDMContext dmc = DMContexts.getAncestorOfType(((IDMVMContext)element).getDMContext(), IRegisterDMContext.class); if (dmc == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/SyncRegisterDataAccess.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/SyncRegisterDataAccess.java index 8fecbdb88c5..4c53b877e9f 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/SyncRegisterDataAccess.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/SyncRegisterDataAccess.java @@ -16,6 +16,7 @@ import java.util.concurrent.ExecutionException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Query; import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor; @@ -35,7 +36,6 @@ import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMContext; import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMData; import org.eclipse.dd.dsf.service.DsfServices; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.IDMVMContext; import org.osgi.framework.InvalidSyntaxException; import org.osgi.util.tracker.ServiceTracker; @@ -109,7 +109,7 @@ public class SyncRegisterDataAccess { IRegisters service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ rm.done(); return; } @@ -211,7 +211,7 @@ public class SyncRegisterDataAccess { */ IRegisters service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } @@ -319,7 +319,7 @@ public class SyncRegisterDataAccess { */ IRegisters service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } @@ -446,7 +446,7 @@ public class SyncRegisterDataAccess { IRegisters service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ rm.done(); return; } @@ -535,7 +535,7 @@ public class SyncRegisterDataAccess { IRegisters service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ rm.done(); return; } @@ -629,7 +629,7 @@ public class SyncRegisterDataAccess { */ IRegisters service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } @@ -738,7 +738,7 @@ public class SyncRegisterDataAccess { */ IRegisters service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } @@ -843,7 +843,7 @@ public class SyncRegisterDataAccess { */ IRegisters service = getService(); if (service == null) { - rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java index 0f715b36969..2cb64e637d1 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java @@ -12,6 +12,7 @@ import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Query; import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor; @@ -119,7 +120,7 @@ public class SyncVariableDataAccess { IExpressions service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ rm.done(); return; } @@ -220,7 +221,7 @@ public class SyncVariableDataAccess { */ IExpressions service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } @@ -331,7 +332,7 @@ public class SyncVariableDataAccess { */ IExpressions service = getService(); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } @@ -430,7 +431,7 @@ public class SyncVariableDataAccess { */ IExpressions service = getService(); if (service == null) { - rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } @@ -526,7 +527,7 @@ public class SyncVariableDataAccess { */ IExpressions service = getService(); if (service == null) { - rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ + rm .setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service unavailable", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableVMNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableVMNode.java index 077ed6ff17e..5f314eee20d 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableVMNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/variable/VariableVMNode.java @@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfExecutor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.MultiRequestMonitor; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.DMContexts; @@ -42,7 +43,6 @@ import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.IExpressionUpdate; import org.eclipse.dd.dsf.debug.ui.viewmodel.numberformat.IFormattedValuePreferenceStore; import org.eclipse.dd.dsf.debug.ui.viewmodel.numberformat.IFormattedValueVMContext; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.IVMContext; import org.eclipse.dd.dsf.ui.viewmodel.VMDelta; import org.eclipse.dd.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider; @@ -228,8 +228,8 @@ public class VariableVMNode extends AbstractExpressionVMNode if (!getStatus().isOK()) { assert getStatus().isOK() || - getStatus().getCode() != IDsfService.INTERNAL_ERROR || - getStatus().getCode() != IDsfService.NOT_SUPPORTED; + getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || + getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; /* * Instead of just failing this outright we are going to attempt to do more here. @@ -473,7 +473,7 @@ public class VariableVMNode extends AbstractExpressionVMNode @Override protected void handleFailedUpdate(IViewerUpdate update) { if (update instanceof IExpressionUpdate) { - update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Update failed", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Update failed", null)); //$NON-NLS-1$ update.done(); } else { super.handleFailedUpdate(update); diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/CommandCache.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/CommandCache.java index f88c8be7480..db4208f08eb 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/CommandCache.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/command/CommandCache.java @@ -22,10 +22,10 @@ import java.util.Map; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.debug.internal.DsfDebugPlugin; -import org.eclipse.dd.dsf.service.IDsfService; /** * This is a utility class for caching results of MI Commands. Return MIInfo @@ -268,7 +268,7 @@ public class CommandCache implements ICommandListener * Return an error if the target is available anymore. */ if (!fIsTargetAvailable) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Target not available.", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Target not available.", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/sourcelookup/DsfMISourceLookupParticipant.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/sourcelookup/DsfMISourceLookupParticipant.java index 9c4b59b3549..a05d01e4cbc 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/sourcelookup/DsfMISourceLookupParticipant.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/sourcelookup/DsfMISourceLookupParticipant.java @@ -25,6 +25,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfExecutor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Query; import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.datamodel.IDMContext; @@ -34,7 +35,6 @@ import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMContext; import org.eclipse.dd.dsf.debug.service.IStack.IFrameDMData; import org.eclipse.dd.dsf.service.DsfServicesTracker; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.sourcelookup.ISourceContainer; import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; @@ -204,7 +204,7 @@ public class DsfMISourceLookupParticipant implements ISourceLookupParticipant { @ConfinedToDsfExecutor("fExecutor") private void getSourceNameOnDispatchThread(IDMContext dmc, final DataRequestMonitor rm) { if (!(dmc instanceof IStack.IFrameDMContext)) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "No source for this object", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "No source for this object", null)); //$NON-NLS-1$ rm.done(); return; } @@ -212,7 +212,7 @@ public class DsfMISourceLookupParticipant implements ISourceLookupParticipant { IStack stackService = fServicesTracker.getService(IStack.class); if (stackService == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfDebugPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Stack data not available", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfDebugPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Stack data not available", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerCountingRequestMonitor.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerCountingRequestMonitor.java index 674e83f5c60..884062638b1 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerCountingRequestMonitor.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerCountingRequestMonitor.java @@ -42,7 +42,7 @@ public class ViewerCountingRequestMonitor extends CountingRequestMonitor { } @Override - protected void handleError() { + protected void handleErrorOrWarning() { fUpdate.setStatus(getStatus()); fUpdate.done(); } diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerDataRequestMonitor.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerDataRequestMonitor.java index b20e3cc04b6..5e8a53a0c2a 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerDataRequestMonitor.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/concurrent/ViewerDataRequestMonitor.java @@ -40,7 +40,7 @@ public class ViewerDataRequestMonitor extends DataRequestMonitor { } @Override - protected void handleError() { + protected void handleErrorOrWarning() { fUpdate.setStatus(getStatus()); fUpdate.done(); } diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMAdapter.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMAdapter.java index 95de160fabb..f4b25c1432e 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMAdapter.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMAdapter.java @@ -17,9 +17,9 @@ import java.util.concurrent.RejectedExecutionException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.internal.ui.DsfUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation; @@ -97,7 +97,7 @@ abstract public class AbstractVMAdapter implements IVMAdapter updateProvider(provider, updates); } else { for (IViewerUpdate update : updates) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "No model provider for update " + update, null)); //$NON-NLS-1$ } } @@ -109,7 +109,7 @@ abstract public class AbstractVMAdapter implements IVMAdapter updateProvider(provider, updates); } else { for (IViewerUpdate update : updates) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "No model provider for update " + update, null)); //$NON-NLS-1$ } } @@ -121,7 +121,7 @@ abstract public class AbstractVMAdapter implements IVMAdapter updateProvider(provider, updates); } else { for (IViewerUpdate update : updates) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "No model provider for update " + update, null)); //$NON-NLS-1$ } } @@ -142,7 +142,7 @@ abstract public class AbstractVMAdapter implements IVMAdapter }); } catch (RejectedExecutionException e) { for (IViewerUpdate update : updates) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Display is disposed, cannot complete update " + update, null)); //$NON-NLS-1$ update.done(); } diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMNode.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMNode.java index f8f67ed9be9..cb7ed0723ea 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMNode.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMNode.java @@ -14,8 +14,8 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfExecutor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.internal.ui.DsfUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate; @@ -52,7 +52,7 @@ abstract public class AbstractVMNode implements IVMNode { } public void getContextsForEvent(VMDelta parentDelta, Object event, DataRequestMonitor rm) { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "", null)); //$NON-NLS-1$ rm.done(); } diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMProvider.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMProvider.java index 495dc80c536..4fc1d2aa95a 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMProvider.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/AbstractVMProvider.java @@ -20,7 +20,7 @@ import java.util.concurrent.RejectedExecutionException; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfExecutor; -import org.eclipse.dd.dsf.service.IDsfService; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.ui.concurrent.DisplayDsfExecutor; import org.eclipse.dd.dsf.ui.concurrent.ViewerDataRequestMonitor; import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate; @@ -336,8 +336,8 @@ abstract public class AbstractVMProvider implements IVMProvider } @Override - protected void handleError() { - if (getStatus().getCode() == IDsfService.NOT_SUPPORTED) { + protected void handleErrorOrWarning() { + if (getStatus().getCode() == IDsfStatusConstants.NOT_SUPPORTED) { updateNode( node, new VMChildrenUpdate( @@ -382,8 +382,8 @@ abstract public class AbstractVMProvider implements IVMProvider } @Override - protected void handleError() { - if (getStatus().getCode() == IDsfService.NOT_SUPPORTED) { + protected void handleErrorOrWarning() { + if (getStatus().getCode() == IDsfStatusConstants.NOT_SUPPORTED) { updateNode( node, new VMChildrenUpdate( diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java index f51c807277a..b82c7ef4d58 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/DefaultVMModelProxyStrategy.java @@ -22,9 +22,9 @@ import org.eclipse.core.runtime.SafeRunner; import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; import org.eclipse.dd.dsf.concurrent.CountingRequestMonitor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.MultiRequestMonitor; import org.eclipse.dd.dsf.concurrent.RequestMonitor; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; @@ -293,7 +293,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy { if (getStatus().isOK()) { assert getData() != null; buildChildDeltasForEventContext(getData(), node, event, parentDelta, nodeOffset, rm); - } else if (getStatus().getCode() == IDsfService.NOT_SUPPORTED) { + } else if (getStatus().getCode() == IDsfStatusConstants.NOT_SUPPORTED) { // The DMC for this node was not found in the event. Call the // super-class to resort to the default behavior which may add a // delta for every element in this node. diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/VMChildrenUpdate.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/VMChildrenUpdate.java index 13943a34ade..93954b441c0 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/VMChildrenUpdate.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/VMChildrenUpdate.java @@ -16,8 +16,8 @@ import java.util.List; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.internal.ui.DsfUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; @@ -129,7 +129,7 @@ public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate */ rm.setData(fElements); if (rm.getStatus().isOK() && fLength != -1 && fElements.size() != fLength) { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$ } super.done(); } diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java index d297215fb27..21ff0b60ac8 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/datamodel/AbstractDMVMNode.java @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Immutable; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.datamodel.IDMContext; @@ -182,7 +183,7 @@ abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode */ protected boolean checkDmc(IDMContext dmc, IViewerUpdate update) { if (dmc == null) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "No valid context found.", null)); //$NON-NLS-1$ handleFailedUpdate(update); return false; @@ -200,7 +201,7 @@ abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode */ protected boolean checkService(Class serviceClass, String filter, IViewerUpdate update) { if (getServicesTracker().getService(serviceClass, filter) == null) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service " + serviceClass.getName() + " not available.", null)); //$NON-NLS-1$ //$NON-NLS-2$ handleFailedUpdate(update); return false; @@ -226,7 +227,7 @@ abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode @ConfinedToDsfExecutor("getSession().getExecutor()") protected void updateHasElementsInSessionThread(final IHasChildrenUpdate update) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "Not implemented, clients should call to update all children instead.", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not implemented, clients should call to update all children instead.", null)); //$NON-NLS-1$ update.done(); } @@ -248,7 +249,7 @@ abstract public class AbstractDMVMNode extends AbstractVMNode implements IVMNode @ConfinedToDsfExecutor("getSession().getExecutor()") protected void updateElementCountInSessionThread(final IChildrenCountUpdate update) { - update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "Not implemented, clients should call to update all children instead.", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not implemented, clients should call to update all children instead.", null)); //$NON-NLS-1$ update.done(); } diff --git a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/properties/PropertyBasedLabelProvider.java b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/properties/PropertyBasedLabelProvider.java index cf2d915942c..3791a7f3c5d 100644 --- a/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/properties/PropertyBasedLabelProvider.java +++ b/plugins/org.eclipse.dd.dsf.ui/src/org/eclipse/dd/dsf/ui/viewmodel/properties/PropertyBasedLabelProvider.java @@ -21,10 +21,10 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.ListenerList; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.ImmediateExecutor; import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.internal.ui.DsfUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.VMViewerUpdate; import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider; import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate; @@ -81,7 +81,7 @@ public class PropertyBasedLabelProvider if (fProperties == null || fValues.size() >= fProperties.length) { rm.setData(fValues); } else { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "Incomplete properties updated", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Incomplete properties updated", null)); //$NON-NLS-1$ } super.done(); } diff --git a/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/concurrent/IDsfStatusConstants.java b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/concurrent/IDsfStatusConstants.java new file mode 100644 index 00000000000..9da092a2198 --- /dev/null +++ b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/concurrent/IDsfStatusConstants.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2008 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wind River Systems - initial API and implementation + *******************************************************************************/ +package org.eclipse.dd.dsf.concurrent; + +/** + * Interface that hold the codes used when reporting status using the DSF + * Request Monitor. + */ +public interface IDsfStatusConstants { + /** + * Error code indicating that the service is in a state which does not allow the + * request to be processed. For example if the client requested target information + * after target was disconnected. + */ + final static int INVALID_STATE = 10001; + + /** + * Error code indicating that client supplied an invalid handle to the service. + * A handle could become invalid after an object it represents is removed from + * the system. + */ + final static int INVALID_HANDLE = 10002; + + /** + * Error code indicating that the client request is not supported/implemented. + */ + final static int NOT_SUPPORTED = 10003; + + /** + * Error code indicating that the request to a sub-service or an external process + * failed. + */ + final static int REQUEST_FAILED = 10004; + + /** + * Error code indicating an unexpected condition in the service, i.e. programming error. + */ + final static int INTERNAL_ERROR = 10005; + +} diff --git a/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/AbstractDsfService.java b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/AbstractDsfService.java index 0c4bc5f8f2c..9392a9492ea 100644 --- a/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/AbstractDsfService.java +++ b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/AbstractDsfService.java @@ -14,20 +14,21 @@ import java.util.Arrays; import java.util.Dictionary; import java.util.Enumeration; -import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfExecutor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; +import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; import org.osgi.framework.ServiceRegistration; /** - * Standard base implementation of the DSF service. This is a convinience + * Standard base implementation of the DSF service. This is a convenience * class that provides the basic functionality that all DSF services have * to implement. */ abstract public class AbstractDsfService - implements IDsfService + implements IDsfService, IDsfStatusConstants { /** Reference to the session that this service belongs to. */ private DsfSession fSession; diff --git a/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/IDsfService.java b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/IDsfService.java index be934f81ee1..16f6a7fb227 100644 --- a/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/IDsfService.java +++ b/plugins/org.eclipse.dd.dsf/src/org/eclipse/dd/dsf/service/IDsfService.java @@ -43,37 +43,7 @@ public interface IDsfService { * all DSF services when they are registered with OSGI service framework. */ final static String PROP_SESSION_ID = "org.eclipse.dd.dsf.service.IService.session_id"; //$NON-NLS-1$ - - /** - * Error code indicating that the service is in a state which does not allow the - * request to be processed. For example if the client requested target information - * after target was disconnected. - */ - final static int INVALID_STATE = 10001; - - /** - * Error code indicating that client supplied an invalid handle to the service. - * A handle could become invalid after an object it represents is removed from - * the system. - */ - final static int INVALID_HANDLE = 10002; - - /** - * Error code indicating that the client request is not supported/implemented. - */ - final static int NOT_SUPPORTED = 10003; - - /** - * Error code indicating that the request to a sub-service or an external process - * failed. - */ - final static int REQUEST_FAILED = 10004; - - /** - * Error code indicating an unexpected condition in the service, i.e. programming error. - */ - final static int INTERNAL_ERROR = 10005; - + /** * Returns the DSF Session that this service belongs to. */ diff --git a/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/filebrowser/FileVMNode.java b/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/filebrowser/FileVMNode.java index eacebbe7b47..1d40f990503 100644 --- a/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/filebrowser/FileVMNode.java +++ b/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/filebrowser/FileVMNode.java @@ -22,9 +22,9 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.internal.ui.DsfUIPlugin; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.IVMContext; import org.eclipse.dd.dsf.ui.viewmodel.IVMNode; import org.eclipse.dd.dsf.ui.viewmodel.IVMProvider; @@ -190,7 +190,7 @@ class FileVMNode } public void getContextsForEvent(VMDelta parentDelta, Object event, DataRequestMonitor rm) { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "", null)); //$NON-NLS-1$ rm.done(); } diff --git a/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/ServicesShutdownSequence.java b/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/ServicesShutdownSequence.java index 0df9281a21d..ca306b8b5ff 100644 --- a/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/ServicesShutdownSequence.java +++ b/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/ServicesShutdownSequence.java @@ -12,6 +12,7 @@ package org.eclipse.dd.examples.dsf.timers; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; import org.eclipse.dd.dsf.service.DsfServicesTracker; @@ -90,7 +91,7 @@ public class ServicesShutdownSequence extends Sequence { else { requestMonitor.setStatus(new Status( IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, - IDsfService.INTERNAL_ERROR, + IDsfStatusConstants.INTERNAL_ERROR, "Service '" + clazz.getName() + "' not found.", null)); requestMonitor.done(); } diff --git a/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/TriggerCellModifier.java b/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/TriggerCellModifier.java index 8b02fb5b788..ef49cd42742 100644 --- a/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/TriggerCellModifier.java +++ b/plugins/org.eclipse.dd.examples.dsf/src/org/eclipse/dd/examples/dsf/timers/TriggerCellModifier.java @@ -17,12 +17,12 @@ import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Query; import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor; import org.eclipse.dd.dsf.service.DsfServices; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.examples.dsf.DsfExamplesPlugin; import org.eclipse.dd.examples.dsf.timers.AlarmService.TriggerDMContext; import org.eclipse.jface.dialogs.MessageDialog; @@ -199,7 +199,7 @@ public class TriggerCellModifier implements ICellModifier { AlarmService service = getService(fDmc); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, + rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service not available", null)); rm.done(); return; @@ -207,7 +207,7 @@ public class TriggerCellModifier implements ICellModifier { int value = service.getTriggerValue(fDmc); if (value == -1) { - rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, + rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); rm.done(); return; @@ -241,7 +241,7 @@ public class TriggerCellModifier implements ICellModifier { // Guard against a disposed service AlarmService service = getService(fDmc); if (service == null) { - rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, + rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "Service not available", null)); rm.done(); return; diff --git a/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/AsyncDataViewer.java b/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/AsyncDataViewer.java index b9e04d83d2b..da828939503 100644 --- a/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/AsyncDataViewer.java +++ b/plugins/org.eclipse.dd.examples.dsf/src_preprocess/org/eclipse/dd/examples/dsf/dataviewer/AsyncDataViewer.java @@ -199,7 +199,7 @@ public class AsyncDataViewer if (item.fIndex < topIdx || item.fIndex > botIdx) { // Set the item to canceled status, so that the data provider // will ignore it. - item.setCanceled(true); + item.cancel(); // Add the item index to list of indexes that were canceled, // which will be sent to the table widget. diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesShutdownSequence.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesShutdownSequence.java index 7404dbad668..f0056268c7e 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesShutdownSequence.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/launch/PDAServicesShutdownSequence.java @@ -13,6 +13,7 @@ package org.eclipse.dd.examples.pda.launch; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DsfExecutor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; import org.eclipse.dd.dsf.debug.service.BreakpointsMediator; @@ -133,7 +134,7 @@ public class PDAServicesShutdownSequence extends Sequence { } }); } else { - requestMonitor.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + requestMonitor.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Service '" + clazz.getName() + "' not found.", null)); //$NON-NLS-1$//$NON-NLS-2$ requestMonitor.done(); } diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpoints.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpoints.java index adfa26047b1..5e4b733ea96 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpoints.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDABreakpoints.java @@ -253,11 +253,11 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints } @Override - protected void handleErrorOrCancel() { + protected void handleCancelOrErrorOrWarning() { // If inserting of the breakpoint failed, remove it from // the set of installed breakpoints. fBreakpoints.remove(breakpointCtx); - super.handleErrorOrCancel(); + super.handleCancelOrErrorOrWarning(); } }); } @@ -319,11 +319,11 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints } @Override - protected void handleErrorOrCancel() { + protected void handleCancelOrErrorOrWarning() { // Since the command failed, we need to remove the breakpoint from // the existing breakpoint set. fBreakpoints.remove(watchpointCtx); - super.handleErrorOrCancel(); + super.handleCancelOrErrorOrWarning(); } }); } diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java index bf4fbedf66b..02462870cbe 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java @@ -14,6 +14,7 @@ package org.eclipse.dd.examples.pda.service; import java.util.Hashtable; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Immutable; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.AbstractDMEvent; @@ -24,7 +25,6 @@ import org.eclipse.dd.dsf.debug.service.command.IEventListener; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.examples.pda.PDAPlugin; import org.eclipse.dd.examples.pda.service.commands.PDACommandResult; import org.eclipse.dd.examples.pda.service.commands.PDAResumeCommand; @@ -244,11 +244,11 @@ public class PDARunControl extends AbstractDsfService new PDAResumeCommand(fCommandControl.getProgramDMContext()), new DataRequestMonitor(getExecutor(), rm) { @Override - protected void handleErrorOrCancel() { + protected void handleCancelOrErrorOrWarning() { // If the resume command failed, we no longer // expect to receive a resumed event. fResumePending = false; - super.handleErrorOrCancel(); + super.handleCancelOrErrorOrWarning(); } } ); @@ -266,7 +266,7 @@ public class PDARunControl extends AbstractDsfService new DataRequestMonitor(getExecutor(), rm)); } else { - PDAPlugin.failRequest(rm, IDsfService.INVALID_STATE, "Given context: " + context + ", is already suspended."); + PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_STATE, "Given context: " + context + ", is already suspended."); } } @@ -285,7 +285,7 @@ public class PDARunControl extends AbstractDsfService new PDAStepCommand(fCommandControl.getProgramDMContext()), new DataRequestMonitor(getExecutor(), rm) { @Override - protected void handleErrorOrCancel() { + protected void handleCancelOrErrorOrWarning() { // If the step command failed, we no longer // expect to receive a resumed event. fResumePending = false; diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java index 6aa231cc771..a54126b9c8d 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java @@ -14,6 +14,7 @@ import java.util.Hashtable; import org.eclipse.cdt.core.IAddress; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.Immutable; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.AbstractDMContext; @@ -29,7 +30,6 @@ import org.eclipse.dd.dsf.debug.service.command.CommandCache; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.examples.pda.PDAPlugin; import org.eclipse.dd.examples.pda.service.commands.PDAFrame; import org.eclipse.dd.examples.pda.service.commands.PDAStackCommand; @@ -215,7 +215,7 @@ public class PDAStack extends AbstractDsfService implements IStack { public void getArguments(IFrameDMContext frameCtx, DataRequestMonitor rm) { - PDAPlugin.failRequest(rm, IDsfService.NOT_SUPPORTED, "PDA debugger does not support function arguments."); + PDAPlugin.failRequest(rm, IDsfStatusConstants.NOT_SUPPORTED, "PDA debugger does not support function arguments."); } public void getFrameData(final IFrameDMContext frameCtx, final DataRequestMonitor rm) { @@ -229,7 +229,7 @@ public class PDAStack extends AbstractDsfService implements IStack { // calculate the index based on frame level. int frameId = getData().fFrames.length - frameCtx.getLevel() - 1; if (frameId < 0) { - PDAPlugin.failRequest(rm, IDsfService.INVALID_HANDLE, "Invalid frame level " + frameCtx); + PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid frame level " + frameCtx); return; } @@ -248,7 +248,7 @@ public class PDAStack extends AbstractDsfService implements IStack { // hierarchy of the argument context to find the execution one. final IExecutionDMContext execCtx = DMContexts.getAncestorOfType(context, IExecutionDMContext.class); if (execCtx == null) { - PDAPlugin.failRequest(rm, IDsfService.INVALID_HANDLE, "Invalid context " + context); + PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid context " + context); return; } @@ -278,7 +278,7 @@ public class PDAStack extends AbstractDsfService implements IStack { // Find the correct PDAFrame int frameId = getData().fFrames.length - frameCtx.getLevel() - 1; if (frameId < 0) { - PDAPlugin.failRequest(rm, IDsfService.INVALID_HANDLE, "Invalid frame level " + frameCtx); + PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid frame level " + frameCtx); return; } PDAFrame pdaFrame = getData().fFrames[frameId]; @@ -315,7 +315,7 @@ public class PDAStack extends AbstractDsfService implements IStack { // hierarchy of the argument context to find the execution one. final IExecutionDMContext execCtx = DMContexts.getAncestorOfType(context, IExecutionDMContext.class); if (execCtx == null) { - PDAPlugin.failRequest(rm, IDsfService.INVALID_HANDLE, "Invalid context " + context); + PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid context " + context); return; } @@ -327,7 +327,7 @@ public class PDAStack extends AbstractDsfService implements IStack { public void getVariableData(IVariableDMContext variableCtx, DataRequestMonitor rm) { if ( !(variableCtx instanceof VariableDMContext) ) { - PDAPlugin.failRequest(rm, IDsfService.INVALID_HANDLE, "Invalid context " + variableCtx); + PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid context " + variableCtx); return; } @@ -356,7 +356,7 @@ public class PDAStack extends AbstractDsfService implements IStack { } else if (dmc instanceof IVariableDMContext) { getVariableData((IVariableDMContext)dmc, (DataRequestMonitor)rm); } else { - PDAPlugin.failRequest(rm, IDsfService.INVALID_HANDLE, "Unknown context type"); + PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Unknown context type"); } } diff --git a/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/GdbLaunch.java b/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/GdbLaunch.java index c864884cb40..3127d6c650e 100644 --- a/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/GdbLaunch.java +++ b/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/GdbLaunch.java @@ -21,6 +21,7 @@ import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; import org.eclipse.dd.dsf.concurrent.DefaultDsfExecutor; import org.eclipse.dd.dsf.concurrent.DsfExecutor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.ImmediateExecutor; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; @@ -28,7 +29,6 @@ import org.eclipse.dd.dsf.concurrent.ThreadSafe; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfServicesTracker; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.gdb.launch.internal.GdbLaunchPlugin; import org.eclipse.dd.gdb.service.command.GDBControl; import org.eclipse.debug.core.DebugException; @@ -83,9 +83,9 @@ public class GdbLaunch extends Launch try { fExecutor.submit(initRunnable).get(); } catch (InterruptedException e) { - new Status(IStatus.ERROR, GdbLaunchPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Error initializing launch", e); //$NON-NLS-1$ + new Status(IStatus.ERROR, GdbLaunchPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Error initializing launch", e); //$NON-NLS-1$ } catch (ExecutionException e) { - new Status(IStatus.ERROR, GdbLaunchPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Error initializing launch", e); //$NON-NLS-1$ + new Status(IStatus.ERROR, GdbLaunchPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Error initializing launch", e); //$NON-NLS-1$ } } diff --git a/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/ShutdownSequence.java b/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/ShutdownSequence.java index 4ddab9e913f..f241dc1021e 100644 --- a/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/ShutdownSequence.java +++ b/plugins/org.eclipse.dd.gdb.launch/src/org/eclipse/dd/gdb/launch/launching/ShutdownSequence.java @@ -13,6 +13,7 @@ package org.eclipse.dd.gdb.launch.launching; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DsfExecutor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; import org.eclipse.dd.dsf.service.DsfServicesTracker; @@ -98,7 +99,7 @@ public class ShutdownSequence extends Sequence { // } // }); // } else { -// requestMonitor.setStatus(new Status(IStatus.ERROR, DsfGdbLaunchPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, +// requestMonitor.setStatus(new Status(IStatus.ERROR, DsfGdbLaunchPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, // "Needed services not found.", null)); //$NON-NLS-1$ // requestMonitor.done(); // } @@ -171,7 +172,7 @@ public class ShutdownSequence extends Sequence { } }); } else { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbLaunchPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + requestMonitor.setStatus(new Status(IStatus.ERROR, GdbLaunchPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Service '" + clazz.getName() + "' not found.", null)); //$NON-NLS-1$//$NON-NLS-2$ requestMonitor.done(); } diff --git a/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java b/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java index cec2b7a7564..23d5cc67026 100644 --- a/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java +++ b/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/breakpoints/GdbThreadFilterEditor.java @@ -20,6 +20,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.ImmediateExecutor; import org.eclipse.dd.dsf.concurrent.Query; import org.eclipse.dd.dsf.datamodel.DMContexts; @@ -27,7 +28,6 @@ import org.eclipse.dd.dsf.debug.service.IRunControl; import org.eclipse.dd.dsf.debug.service.IRunControl.IContainerDMContext; import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension; import org.eclipse.dd.gdb.internal.ui.GdbUIPlugin; import org.eclipse.dd.gdb.launch.launching.GdbLaunch; @@ -368,7 +368,7 @@ public class GdbThreadFilterEditor { @Override protected void execute(DataRequestMonitor rm) { if (!session.isActive()) { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "Launch's session not active.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Launch's session not active.")); //$NON-NLS-1$ rm.done(); return; } @@ -380,7 +380,7 @@ public class GdbThreadFilterEditor { if (gdbControl != null) { rm.setData(gdbControl.getGDBDMContext()); } else { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ } rm.done(); tracker.close(); @@ -408,7 +408,7 @@ public class GdbThreadFilterEditor { @Override protected void execute(DataRequestMonitor rm) { if (!session.isActive()) { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$ rm.done(); return; } @@ -420,7 +420,7 @@ public class GdbThreadFilterEditor { if (runControl != null) { runControl.getExecutionContexts(container, rm); } else { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ rm.done(); } tracker.close(); @@ -448,7 +448,7 @@ public class GdbThreadFilterEditor { @Override protected void execute(DataRequestMonitor rm) { if (!session.isActive()) { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$ rm.done(); return; } @@ -460,7 +460,7 @@ public class GdbThreadFilterEditor { if (gdbControl != null) { rm.setData(gdbControl.getExecutablePath().toOSString()); } else { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ } rm.done(); tracker.close(); @@ -488,7 +488,7 @@ public class GdbThreadFilterEditor { @Override protected void execute(final DataRequestMonitor rm) { if (!session.isActive()) { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$ rm.done(); return; } @@ -513,7 +513,7 @@ public class GdbThreadFilterEditor { } }); } else { - rm.setStatus(getFailStatus(IDsfService.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ + rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Control not accessible.")); //$NON-NLS-1$ rm.done(); } tracker.close(); diff --git a/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java b/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java index fefd36c28a9..2f2c15e0ae4 100644 --- a/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java +++ b/plugins/org.eclipse.dd.gdb.ui/src/org/eclipse/dd/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java @@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.datamodel.IDMContext; @@ -33,7 +34,6 @@ import org.eclipse.dd.dsf.debug.service.IRunControl.ISuspendedDMEvent; import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason; import org.eclipse.dd.dsf.internal.ui.DsfUIPlugin; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.dsf.ui.viewmodel.IVMContext; import org.eclipse.dd.dsf.ui.viewmodel.ModelProxyInstalledEvent; import org.eclipse.dd.dsf.ui.viewmodel.VMChildrenUpdate; @@ -177,17 +177,17 @@ public class ThreadVMNode extends AbstractDMVMNode } else if (vmcIdx >= 0) { rm.setData(new VMContextInfo((IVMContext)getData().get(vmcIdx), vmcIdx, false)); } else { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "No threads available", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "No threads available", null)); //$NON-NLS-1$ } rm.done(); } else { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "No threads available", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "No threads available", null)); //$NON-NLS-1$ rm.done(); } } }); } catch (RejectedExecutionException e) { - rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "", null)); //$NON-NLS-1$ rm.done(); } } diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/service/command/GDBControl.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/service/command/GDBControl.java index ef6b93238d0..c4e450184ef 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/service/command/GDBControl.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/service/command/GDBControl.java @@ -32,13 +32,13 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; import org.eclipse.dd.dsf.datamodel.AbstractDMEvent; import org.eclipse.dd.dsf.debug.service.command.ICommandControl; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.gdb.internal.GdbPlugin; import org.eclipse.dd.mi.service.command.AbstractCLIProcess; import org.eclipse.dd.mi.service.command.AbstractMIControl; @@ -458,7 +458,7 @@ public class GDBControl extends AbstractMIControl { attempts++; } requestMonitor.setStatus(new Status( - IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "Process terminate failed", null)); //$NON-NLS-1$ + IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Process terminate failed", null)); //$NON-NLS-1$ requestMonitor.done(); return Status.OK_STATUS; } @@ -534,7 +534,7 @@ public class GDBControl extends AbstractMIControl { fCLIProcess = new GDBCLIProcess(GDBControl.this, fUseInterpreterConsole); } catch(IOException e) { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "Failed to create CLI Process", e)); //$NON-NLS-1$ + requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Failed to create CLI Process", e)); //$NON-NLS-1$ requestMonitor.done(); return; } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/CSourceLookup.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/CSourceLookup.java index 7390c09f05a..333389f510b 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/CSourceLookup.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/CSourceLookup.java @@ -28,12 +28,12 @@ import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.debug.service.ISourceLookup; import org.eclipse.dd.dsf.debug.service.command.ICommandControl; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.command.commands.MIEnvironmentDirectory; import org.eclipse.dd.mi.service.command.output.MIInfo; @@ -137,14 +137,14 @@ public class CSourceLookup extends AbstractDsfService implements ISourceLookup { { if (! (source instanceof String)) { // In future if needed other elements such as URIs could be supported. - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "Only string source element is supported", null)); //$NON-NLS-1$); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Only string source element is supported", null)); //$NON-NLS-1$); rm.done(); return; } final String sourceString = (String) source; if (!fDirectors.containsKey(sourceLookupCtx) ){ - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "No source director configured for given context", null)); //$NON-NLS-1$); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "No source director configured for given context", null)); //$NON-NLS-1$); rm.done(); return; } @@ -170,7 +170,7 @@ public class CSourceLookup extends AbstractDsfService implements ISourceLookup { public void getSource(ISourceLookupDMContext sourceLookupCtx, final String debuggerPath, final DataRequestMonitor rm) { if (!fDirectors.containsKey(sourceLookupCtx) ){ - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "No source director configured for given context", null)); //$NON-NLS-1$); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "No source director configured for given context", null)); //$NON-NLS-1$); rm.done(); return; } @@ -183,12 +183,12 @@ public class CSourceLookup extends AbstractDsfService implements ISourceLookup { try { sources = director.findSourceElements(debuggerPath); if (sources == null || sources.length == 0) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "No sources found", null)); //$NON-NLS-1$); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "No sources found", null)); //$NON-NLS-1$); } else { rm.setData(sources[0]); } } catch (CoreException e) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, "Source lookup failed", e)); //$NON-NLS-1$); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Source lookup failed", e)); //$NON-NLS-1$); } finally { rm.done(); } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java index 8f97eb51a53..5f6dfe7b801 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java @@ -30,7 +30,6 @@ import org.eclipse.dd.dsf.debug.service.command.ICommandControl; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.command.commands.MIBreakAfter; import org.eclipse.dd.mi.service.command.commands.MIBreakCondition; @@ -291,7 +290,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints { // Validate the context if (context == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); drm.done(); return; } @@ -338,7 +337,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints { // Validate the breakpoint context if (dmc == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); drm.done(); return; } @@ -349,7 +348,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints breakpoint = (MIBreakpointDMContext) dmc; } else { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); drm.done(); return; } @@ -357,7 +356,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Validate the target context IBreakpointsTargetDMContext context = DMContexts.getAncestorOfType(breakpoint, IBreakpointsTargetDMContext.class); if (context == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); drm.done(); return; } @@ -365,7 +364,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Select the breakpoints context map Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); drm.done(); return; } @@ -387,7 +386,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Validate the context if (context == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); drm.done(); return; } @@ -402,7 +401,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Validate the breakpoint type String type = (String) attributes.get(BREAKPOINT_TYPE); if (type == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); drm.done(); return; } @@ -415,7 +414,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints addWatchpoint(context, attributes, drm); } else { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); drm.done(); } } @@ -467,7 +466,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Select the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); drm.done(); return; } @@ -489,7 +488,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // With MI, an invalid location won't generate an error if (getData().getMIBreakpoints().length == 0) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null)); drm.done(); return; } @@ -498,7 +497,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints final MIBreakpointDMData newBreakpoint = new MIBreakpointDMData(getData().getMIBreakpoints()[0]); int reference = newBreakpoint.getNumber(); if (reference == -1) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null)); drm.done(); return; } @@ -520,7 +519,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints @Override protected void handleError() { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, BREAKPOINT_INSERTION_FAILURE, null)); drm.done(); } }; @@ -542,7 +541,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Pick the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); drm.done(); return; } @@ -560,7 +559,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // With MI, an invalid location won't generate an error if (getData().getMIBreakpoints().length == 0) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, WATCHPOINT_INSERTION_FAILURE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, WATCHPOINT_INSERTION_FAILURE, null)); drm.done(); return; } @@ -569,7 +568,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints final MIBreakpointDMData newBreakpoint = new MIBreakpointDMData(getData().getMIBreakpoints()[0]); int reference = newBreakpoint.getNumber(); if (reference == -1) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, WATCHPOINT_INSERTION_FAILURE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, WATCHPOINT_INSERTION_FAILURE, null)); drm.done(); return; } @@ -593,7 +592,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints @Override protected void handleError() { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, WATCHPOINT_INSERTION_FAILURE, null)); + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, WATCHPOINT_INSERTION_FAILURE, null)); drm.done(); } }; @@ -613,7 +612,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Validate the breakpoint context if (dmc == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); rm.done(); return; } @@ -624,7 +623,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints breakpointCtx = (MIBreakpointDMContext) dmc; } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); rm.done(); return; } @@ -632,7 +631,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Validate the target context IBreakpointsTargetDMContext context = DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class); if (context == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); rm.done(); return; } @@ -640,7 +639,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Pick the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } @@ -649,7 +648,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints final int reference = breakpointCtx.getReference(); MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); if (breakpoint == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } @@ -680,7 +679,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints { // Validate the breakpoint context if (dmc == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); rm.done(); return; } @@ -691,7 +690,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints breakpointCtx = (MIBreakpointDMContext) dmc; } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_TYPE, null)); rm.done(); return; } @@ -699,7 +698,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Validate the context IBreakpointsTargetDMContext context = DMContexts.getAncestorOfType(dmc, IBreakpointsTargetDMContext.class); if (context == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_EXECUTION_CONTEXT, null)); rm.done(); return; } @@ -707,7 +706,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Pick the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } @@ -716,7 +715,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints final int reference = breakpointCtx.getReference(); MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); if (breakpoint == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } @@ -814,7 +813,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Pick the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); rm.done(); return; } @@ -827,7 +826,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints protected void handleCompleted() { MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); if (breakpoint == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } @@ -835,7 +834,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints breakpoint.setCondition(condition); } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, INVALID_CONDITION, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, INVALID_CONDITION, null)); breakpoint.setCondition(NULL_STRING); } rm.done(); @@ -858,7 +857,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Pick the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); rm.done(); return; } @@ -871,7 +870,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints protected void handleOK() { MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); if (breakpoint == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } @@ -894,7 +893,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Pick the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); rm.done(); return; } @@ -907,7 +906,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints protected void handleOK() { MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); if (breakpoint == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } @@ -930,7 +929,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints // Pick the context breakpoints map final Map contextBreakpoints = fBreakpoints.get(context); if (contextBreakpoints == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT_CONTEXT, null)); rm.done(); return; } @@ -943,7 +942,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints protected void handleOK() { MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); if (breakpoint == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.done(); return; } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIMemory.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIMemory.java index ef259a8ae72..b958bcdec73 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIMemory.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIMemory.java @@ -23,6 +23,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.CountingRequestMonitor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.AbstractDMEvent; import org.eclipse.dd.dsf.datamodel.DMContexts; @@ -38,7 +39,6 @@ import org.eclipse.dd.dsf.debug.service.command.ICommandControl; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.ExpressionService.ExpressionChangedEvent; import org.eclipse.dd.mi.service.command.commands.MIDataReadMemory; @@ -173,14 +173,14 @@ public class MIMemory extends AbstractDsfService implements IMemory { // Validate the word size // NOTE: We only accept 1 byte words for this implementation if (word_size != 1) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "Word size not supported (!= 1)", null)); //$NON-NLS-1$ + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Word size not supported (!= 1)", null)); //$NON-NLS-1$ drm.done(); return; } // Validate the byte count if (count < 0) { - drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Invalid word count (< 0)", null)); //$NON-NLS-1$ + drm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Invalid word count (< 0)", null)); //$NON-NLS-1$ drm.done(); return; } @@ -205,21 +205,21 @@ public class MIMemory extends AbstractDsfService implements IMemory { // Validate the word size // NOTE: We only accept 1 byte words for this implementation if (word_size != 1) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "Word size not supported (!= 1)", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Word size not supported (!= 1)", null)); //$NON-NLS-1$ rm.done(); return; } // Validate the byte count if (count < 0) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Invalid word count (< 0)", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Invalid word count (< 0)", null)); //$NON-NLS-1$ rm.done(); return; } // Validate the buffer size if (buffer.length < count) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Buffer too short", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Buffer too short", null)); //$NON-NLS-1$ rm.done(); return; } @@ -244,21 +244,21 @@ public class MIMemory extends AbstractDsfService implements IMemory { // Validate the word size // NOTE: We only accept 1 byte words for this implementation if (word_size != 1) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, "Word size not supported (!= 1)", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Word size not supported (!= 1)", null)); //$NON-NLS-1$ rm.done(); return; } // Validate the repeat count if (count < 0) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Invalid repeat count (< 0)", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Invalid repeat count (< 0)", null)); //$NON-NLS-1$ rm.done(); return; } // Validate the pattern if (pattern.length < 1) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Empty pattern", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Empty pattern", null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRegisters.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRegisters.java index 56c17b4eb45..596a4b70ab2 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRegisters.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRegisters.java @@ -276,7 +276,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters { // If the list is empty just return empty handed. if (regValue.length == 0) { assert false : "Backend protocol error"; //$NON-NLS-1$ - //done.setStatus(new Status(IStatus.ERROR, IDsfService.INTERNAL_ERROR ,)); + //done.setStatus(new Status(IStatus.ERROR, IDsfStatusConstants.INTERNAL_ERROR ,)); rm.done(); return; } @@ -331,7 +331,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters { // If the list is empty just return empty handed. if (regValue.length == 0) { assert false : "Backend protocol error"; //$NON-NLS-1$ - //done.setStatus(new Status(IStatus.ERROR, IDsfService.INTERNAL_ERROR ,)); + //done.setStatus(new Status(IStatus.ERROR, IDsfStatusConstants.INTERNAL_ERROR ,)); rm.done(); return; } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java index 644182278e4..1e7fb7ea3ab 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIRunControl.java @@ -28,7 +28,6 @@ import org.eclipse.dd.dsf.debug.service.command.ICommandControl; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.command.commands.MIExecContinue; import org.eclipse.dd.mi.service.command.commands.MIExecFinish; @@ -475,7 +474,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl else{ IMIExecutionDMContext dmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class); if (dmc == null){ - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_STATE, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ rm.done(); return; } @@ -491,7 +490,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl } ); }else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Given context: " + context + ", is already running.", null)); //$NON-NLS-1$ //$NON-NLS-2$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_STATE, "Given context: " + context + ", is already running.", null)); //$NON-NLS-1$ //$NON-NLS-2$ rm.done(); } } @@ -507,7 +506,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl else { IMIExecutionDMContext dmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class); if (dmc == null){ - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ rm.done(); return; } @@ -523,7 +522,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl } ); } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Given context: " + context + ", is already suspended.", null)); //$NON-NLS-1$ //$NON-NLS-2$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Given context: " + context + ", is already suspended.", null)); //$NON-NLS-1$ //$NON-NLS-2$ rm.done(); } } @@ -537,7 +536,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl IMIExecutionDMContext dmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class); if (dmc == null){ - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ rm.done(); return; } @@ -574,12 +573,12 @@ public class MIRunControl extends AbstractDsfService implements IRunControl fConnection.queueCommand( new MIExecFinish(topFrameDmc), new DataRequestMonitor(getExecutor(), rm) {}); } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Cannot create context for command, stack service not available.", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Cannot create context for command, stack service not available.", null)); //$NON-NLS-1$ rm.done(); } break; default: - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, "Given step type not supported", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INTERNAL_ERROR, "Given step type not supported", null)); //$NON-NLS-1$ rm.done(); } } @@ -643,7 +642,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl IMIExecutionDMContext dmc = DMContexts.getAncestorOfType(context, IMIExecutionDMContext.class); if (dmc == null){ - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Given context: " + context + " is not an execution context.", null)); //$NON-NLS-1$ //$NON-NLS-2$ rm.done(); return; } @@ -660,7 +659,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl } }); } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, NOT_SUPPORTED, "Cannot resume given DMC.", null)); //$NON-NLS-1$ rm.done(); } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java index 59582892581..7baa34260f8 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIStack.java @@ -34,7 +34,6 @@ import org.eclipse.dd.dsf.debug.service.IRunControl.StateChangeReason; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.command.commands.MIStackInfoDepth; import org.eclipse.dd.mi.service.command.commands.MIStackListArguments; @@ -166,7 +165,7 @@ public class MIStack extends AbstractDsfService getVariableData((MIVariableDMC)dmc, (DataRequestMonitor)rm); // getVariablesData invokes rm } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Unknown DMC type", null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_HANDLE, "Unknown DMC type", null)); //$NON-NLS-1$ rm.done(); } } @@ -198,7 +197,7 @@ public class MIStack extends AbstractDsfService if (execDmc == null) { //rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, -1, "No frame context found in " + ctx, null)); //$NON-NLS-1$ - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context" + ctx, null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + ctx, null)); //$NON-NLS-1$ rm.done(); return; } @@ -216,7 +215,7 @@ public class MIStack extends AbstractDsfService public void getTopFrame(final IDMContext ctx, final DataRequestMonitor rm) { final IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(ctx, IMIExecutionDMContext.class); if (execDmc == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context" + ctx, null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + ctx, null)); //$NON-NLS-1$ rm.done(); return; } @@ -258,7 +257,7 @@ public class MIStack extends AbstractDsfService public void getFrameData(final IFrameDMContext frameDmc, final DataRequestMonitor rm) { if (!(frameDmc instanceof MIFrameDMC)) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "Invalid context type " + frameDmc, null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context type " + frameDmc, null)); //$NON-NLS-1$ rm.done(); return; } @@ -267,7 +266,7 @@ public class MIStack extends AbstractDsfService IMIExecutionDMContext execDmc = DMContexts.getAncestorOfType(frameDmc, IMIExecutionDMContext.class); if (execDmc == null) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, "No execution context found in " + frameDmc, null)); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_HANDLE, "No execution context found in " + frameDmc, null)); //$NON-NLS-1$ rm.done(); return; } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIVariableManager.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIVariableManager.java index b445a0619d4..82390639728 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIVariableManager.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIVariableManager.java @@ -24,6 +24,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.CountingRequestMonitor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.datamodel.DMContexts; import org.eclipse.dd.dsf.debug.service.IExpressions; @@ -44,7 +45,6 @@ import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfServiceEventHandler; import org.eclipse.dd.dsf.service.DsfServicesTracker; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.ExpressionService.ExpressionInfo; import org.eclipse.dd.mi.service.ExpressionService.MIExpressionDMC; @@ -822,7 +822,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon // If the variable is a complex structure (including an array), then we cannot write to it if (isComplex()) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Cannot change the value of a complex expression", null)); //$NON-NLS-1$ rm.done(); return; @@ -849,7 +849,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon try { value = Integer.toString(Integer.parseInt(value, 2)); } catch (NumberFormatException e) { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid binary number: " + value, e)); //$NON-NLS-1$ rm.done(); return; @@ -864,7 +864,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon // we do nothing for now and let the user have put in the proper value } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_HANDLE, + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Unknown format: " + formatId, null)); //$NON-NLS-1$ rm.done(); return; @@ -874,7 +874,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon // Return a status info so that handleOK is not called and we don't send // an ExpressionChanged event if (value.equals(getValue(formatId))) { - rm.setStatus(new Status(IStatus.INFO, MIPlugin.PLUGIN_ID, IDsfService.NOT_SUPPORTED, + rm.setStatus(new Status(IStatus.INFO, MIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Setting to the same value of: " + value, null)); //$NON-NLS-1$ rm.done(); return; @@ -1607,7 +1607,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon // This does not use the variable objects but sends the command directly to the back-end fCommandControl.queueCommand(command, rm); } else { - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Unexpected Expression Meta command", null)); //$NON-NLS-1$ rm.done(); } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java index a2d3b3741f0..62a6be29442 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/AbstractMIControl.java @@ -39,7 +39,6 @@ import org.eclipse.dd.dsf.debug.service.command.ICommandResult; import org.eclipse.dd.dsf.debug.service.command.IEventListener; import org.eclipse.dd.dsf.service.AbstractDsfService; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.IMIExecutionDMContext; import org.eclipse.dd.mi.service.command.commands.MICommand; @@ -133,7 +132,7 @@ public abstract class AbstractMIControl extends AbstractDsfService */ private Status genStatus(String str) { - return new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, str, null); + return new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, INVALID_STATE, str, null); } protected void stopCommandProcessing() { @@ -631,7 +630,7 @@ public abstract class AbstractMIControl extends AbstractDsfService if ( errorResult.equals(MIResultRecord.ERROR) ) { String status = getStatusString(commandHandle.getCommand(),response); - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.REQUEST_FAILED, status, null)); + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, status, null)); } /* diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIInferiorProcess.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIInferiorProcess.java index 83bdc774da0..fbc80308ab4 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIInferiorProcess.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/command/MIInferiorProcess.java @@ -29,6 +29,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.ConfinedToDsfExecutor; import org.eclipse.dd.dsf.concurrent.DataRequestMonitor; import org.eclipse.dd.dsf.concurrent.DsfRunnable; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.ImmediateExecutor; import org.eclipse.dd.dsf.concurrent.Query; import org.eclipse.dd.dsf.debug.service.command.ICommand; @@ -36,7 +37,6 @@ import org.eclipse.dd.dsf.debug.service.command.ICommandListener; import org.eclipse.dd.dsf.debug.service.command.ICommandResult; import org.eclipse.dd.dsf.debug.service.command.IEventListener; import org.eclipse.dd.dsf.service.DsfSession; -import org.eclipse.dd.dsf.service.IDsfService; import org.eclipse.dd.mi.internal.MIPlugin; import org.eclipse.dd.mi.service.command.commands.CLICommand; import org.eclipse.dd.mi.service.command.commands.CLIExecAbort; @@ -231,7 +231,7 @@ public class MIInferiorProcess extends Process } else if (getState() != State.TERMINATED) { // This will cause ExecutionException to be thrown with a CoreException, // which will in turn contain the IllegalThreadStateException. - rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfService.INVALID_STATE, "GDB is still running.", new IllegalThreadStateException())); //$NON-NLS-1$ + rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, "GDB is still running.", new IllegalThreadStateException())); //$NON-NLS-1$ rm.done(); } else { getCommandControl().queueCommand( diff --git a/plugins/org.eclipse.dd.tests.gdb/src/org/eclipse/dd/tests/gdb/launching/ShutdownSequence.java b/plugins/org.eclipse.dd.tests.gdb/src/org/eclipse/dd/tests/gdb/launching/ShutdownSequence.java index 1a4ce69ad4f..14357c73502 100644 --- a/plugins/org.eclipse.dd.tests.gdb/src/org/eclipse/dd/tests/gdb/launching/ShutdownSequence.java +++ b/plugins/org.eclipse.dd.tests.gdb/src/org/eclipse/dd/tests/gdb/launching/ShutdownSequence.java @@ -13,6 +13,7 @@ package org.eclipse.dd.tests.gdb.launching; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.dd.dsf.concurrent.DsfExecutor; +import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; import org.eclipse.dd.dsf.service.DsfServicesTracker; @@ -71,7 +72,7 @@ public class ShutdownSequence extends Sequence { if (bpm != null && commandControl != null) { bpm.stopTrackingBreakpoints(commandControl.getGDBDMContext(), requestMonitor); } else { - requestMonitor.setStatus(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + requestMonitor.setStatus(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Needed services not found.", null)); //$NON-NLS-1$ requestMonitor.done(); } @@ -99,7 +100,7 @@ public class ShutdownSequence extends Sequence { service.shutdown(requestMonitor); } else { - requestMonitor.setStatus(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, IDsfService.INTERNAL_ERROR, + requestMonitor.setStatus(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Service '" + clazz.getName() + "' not found.", null)); //$NON-NLS-1$//$NON-NLS-2$ requestMonitor.done(); }