1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

[179293] Refactor the handle*() methods of the RequestMoniotr.

This commit is contained in:
Pawel Piech 2008-03-27 02:40:19 +00:00
parent 2eeb644c2f
commit 26ae2918f0
77 changed files with 417 additions and 375 deletions

View file

@ -386,7 +386,7 @@ public class NumberFormatDetailPane implements IDetailPane, IAdaptable, IPropert
final DataRequestMonitor<String[]> getAvailableFormatsDone = final DataRequestMonitor<String[]> getAvailableFormatsDone =
new DataRequestMonitor<String[]>(finalService.getSession().getExecutor(), null) { new DataRequestMonitor<String[]>(finalService.getSession().getExecutor(), null) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* Now we have a set of formats for each one fire up an independent * Now we have a set of formats for each one fire up an independent
* asynchronous request to get the data in that format. We do not * asynchronous request to get the data in that format. We do not

View file

@ -285,7 +285,7 @@ public class MISourceDisplayAdapter implements ISourceDisplay
frameDmc, frameDmc,
new DataRequestMonitor<IFrameDMData>(fExecutor, rm) { new DataRequestMonitor<IFrameDMData>(fExecutor, rm) {
@Override @Override
public void handleOK() { public void handleSuccess() {
FramePositioningData clientData = new FramePositioningData(); FramePositioningData clientData = new FramePositioningData();
clientData.fLevel = frameDmc.getLevel(); clientData.fLevel = frameDmc.getLevel();
// Document line numbers are 0-based. While debugger line numbers are 1-based. // Document line numbers are 0-based. While debugger line numbers are 1-based.

View file

@ -51,7 +51,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode
update, -1, -1, update, -1, -1,
new ViewerDataRequestMonitor<List<Object>>(getExecutor(), update) { new ViewerDataRequestMonitor<List<Object>>(getExecutor(), update) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
if (getData().size() == 0) { if (getData().size() == 0) {
update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.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(); update.done();
@ -97,7 +97,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode
} }
@Override @Override
protected void handleNotOK() { protected void handleFailure() {
update.setStatus(getStatus()); update.setStatus(getStatus());
update.done(); update.done();
} }

View file

@ -195,7 +195,7 @@ public class ExpressionManagerVMNode extends AbstractVMNode
update, expression, update, expression,
new DataRequestMonitor<Object>(getVMProvider().getExecutor(), multiRm) { new DataRequestMonitor<Object>(getVMProvider().getExecutor(), multiRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
update.setChild(getData(), childIndex); update.setChild(getData(), childIndex);
multiRm.done(); multiRm.done();
} }

View file

@ -52,7 +52,7 @@ public class ExpressionVMProviderContentStragegy extends DefaultVMContentProvide
update, update.getExpression(), update, update.getExpression(),
new ViewerDataRequestMonitor<Object>(getVMProvider().getExecutor(), update) { new ViewerDataRequestMonitor<Object>(getVMProvider().getExecutor(), update) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Check if the evaluated node has child expression nodes. // Check if the evaluated node has child expression nodes.
// If it does, check if any of those nodes can evaluate the given // If it does, check if any of those nodes can evaluate the given
// expression further. If they can, call the child node to further // expression further. If they can, call the child node to further
@ -70,7 +70,7 @@ public class ExpressionVMProviderContentStragegy extends DefaultVMContentProvide
new ViewerDataRequestMonitor<Object>(getVMProvider().getExecutor(), update) { new ViewerDataRequestMonitor<Object>(getVMProvider().getExecutor(), update) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
update.setExpressionElement(getData()); update.setExpressionElement(getData());
update.done(); update.done();
} }

View file

@ -79,7 +79,7 @@ public class ExpressionVMProviderModelProxyStrategy extends DefaultVMModelProxyS
expression, expressionElementIdx, event, parentDelta, path, expression, expressionElementIdx, event, parentDelta, path,
new RequestMonitor(getVMProvider().getExecutor(), rm) { new RequestMonitor(getVMProvider().getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
final IExpressionVMNode matchingNode = final IExpressionVMNode matchingNode =
getExpressionVMProvider().findNodeToParseExpression(node, expression); getExpressionVMProvider().findNodeToParseExpression(node, expression);
if (matchingNode != null && !matchingNode.equals(node)) { if (matchingNode != null && !matchingNode.equals(node)) {
@ -90,7 +90,7 @@ public class ExpressionVMProviderModelProxyStrategy extends DefaultVMModelProxyS
parentDelta, getVMProvider().getPresentationContext(), expression, parentDelta, getVMProvider().getPresentationContext(), expression,
new DataRequestMonitor<Object>(getVMProvider().getExecutor(), rm) { new DataRequestMonitor<Object>(getVMProvider().getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
buildDeltaForExpressionElement( buildDeltaForExpressionElement(
node, getData(), expressionElementIdx, event, parentDelta, path, rm); node, getData(), expressionElementIdx, event, parentDelta, path, rm);
} }

View file

@ -85,7 +85,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
new DataRequestMonitor<IFrameDMContext[]>(getSession().getExecutor(), null) { new DataRequestMonitor<IFrameDMContext[]>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
// Failed to retrieve frames. If we are stepping, we // Failed to retrieve frames. If we are stepping, we
// might still be able to retrieve just the top stack // might still be able to retrieve just the top stack
// frame, which would still be useful in Debug View. // frame, which would still be useful in Debug View.
@ -129,7 +129,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
new DataRequestMonitor<IFrameDMContext>(getExecutor(), null) { new DataRequestMonitor<IFrameDMContext>(getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
@ -189,7 +189,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
* service changed during the request, but the view model * service changed during the request, but the view model
* has not been updated yet. * has not been updated yet.
*/ */
if (!getStatus().isOK()) { if (!isSuccess()) {
assert getStatus().isOK() || assert getStatus().isOK() ||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;
@ -294,7 +294,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
new DataRequestMonitor<List<Object>>(getExecutor(), null) { new DataRequestMonitor<List<Object>>(getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (getStatus().isOK() && getData().size() != 0) { if (isSuccess() && getData().size() != 0) {
rm.setData(new IVMContext[] { (IVMContext)getData().get(0) }); rm.setData(new IVMContext[] { (IVMContext)getData().get(0) });
} else { } else {
// In case of errors, return an empty set of frames. // In case of errors, return an empty set of frames.
@ -429,7 +429,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
new DataRequestMonitor<List<Object>>(getExecutor(), null) { new DataRequestMonitor<List<Object>>(getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (getStatus().isOK() && getData().size() != 0) { if (isSuccess() && getData().size() != 0) {
parentDelta.addNode( getData().get(0), 0, IModelDelta.SELECT | IModelDelta.EXPAND); parentDelta.addNode( getData().get(0), 0, IModelDelta.SELECT | IModelDelta.EXPAND);
} }
rm.done(); rm.done();

View file

@ -382,7 +382,7 @@ public class ModuleDetailPane extends AbstractDetailPane implements IAdaptable,
// final DataRequestMonitor<IModuleDMData> modData = // final DataRequestMonitor<IModuleDMData> modData =
// new DataRequestMonitor<IModuleDMData>(service.getSession().getExecutor(), null) { // new DataRequestMonitor<IModuleDMData>(service.getSession().getExecutor(), null) {
// @Override // @Override
// protected void handleOK() { // protected void handleSuccess() {
// detailComputed(getModuleDetail(getData())); // detailComputed(getModuleDetail(getData()));
// } // }
// }; // };
@ -544,7 +544,7 @@ public class ModuleDetailPane extends AbstractDetailPane implements IAdaptable,
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */

View file

@ -52,7 +52,7 @@ public class ModulesVMNode extends AbstractDMVMNode
new DataRequestMonitor<IModuleDMContext[]>(getSession().getExecutor(), null) { new DataRequestMonitor<IModuleDMContext[]>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
update.done(); update.done();
return; return;
} }
@ -97,7 +97,7 @@ public class ModulesVMNode extends AbstractDMVMNode
* changed during the request, but the view model * changed during the request, but the view model
* has not been updated yet. * has not been updated yet.
*/ */
if (!getStatus().isOK()) { if (!isSuccess()) {
assert getStatus().isOK() || assert getStatus().isOK() ||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;

View file

@ -229,7 +229,7 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
@ -290,7 +290,7 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
* service changed during the request, but the view model * service changed during the request, but the view model
* has not been updated yet. * has not been updated yet.
*/ */
if (!getStatus().isOK()) { if (!isSuccess()) {
assert getStatus().isOK() || assert getStatus().isOK() ||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;
@ -375,12 +375,12 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
regDmc, regDmc,
new DataRequestMonitor<IBitFieldDMContext[]>(getSession().getExecutor(), null) { new DataRequestMonitor<IBitFieldDMContext[]>(getSession().getExecutor(), null) {
@Override @Override
protected void handleNotOK() { protected void handleFailure() {
handleFailedUpdate(update); handleFailedUpdate(update);
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
fillUpdateWithVMCs(update, getData()); fillUpdateWithVMCs(update, getData());
update.done(); update.done();
} }

View file

@ -138,7 +138,7 @@ public class RegisterGroupVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<IRegisterGroupDMContext[]>(getSession().getExecutor(), null) { new DataRequestMonitor<IRegisterGroupDMContext[]>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
update.done(); update.done();
return; return;
} }
@ -185,7 +185,7 @@ public class RegisterGroupVMNode extends AbstractExpressionVMNode
* service changed during the request, but the view model * service changed during the request, but the view model
* has not been updated yet. * has not been updated yet.
*/ */
if (!getStatus().isOK()) { if (!isSuccess()) {
assert getStatus().isOK() || assert getStatus().isOK() ||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;

View file

@ -178,7 +178,7 @@ public class RegisterVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) { new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
@ -228,7 +228,7 @@ public class RegisterVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
@ -290,7 +290,7 @@ public class RegisterVMNode extends AbstractExpressionVMNode
* service changed during the request, but the view model * service changed during the request, but the view model
* has not been updated yet. * has not been updated yet.
*/ */
if (!getStatus().isOK()) { if (!isSuccess()) {
assert getStatus().isOK() || assert getStatus().isOK() ||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;
@ -370,7 +370,7 @@ public class RegisterVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<IRegisterDMContext[]>(getSession().getExecutor(), null) { new DataRequestMonitor<IRegisterDMContext[]>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }

View file

@ -129,7 +129,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -238,7 +238,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -345,7 +345,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -466,7 +466,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -555,7 +555,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -660,7 +660,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -763,7 +763,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -868,7 +868,7 @@ public class SyncRegisterDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */

View file

@ -134,13 +134,14 @@ public class SyncVariableDataAccess {
*/ */
if (!DsfSession.isSessionActive(session.getId())) { if (!DsfSession.isSessionActive(session.getId())) {
GetVariableValueQuery.this.cancel(false); GetVariableValueQuery.this.cancel(false);
rm.done();
return; return;
} }
super.handleCompleted(); super.handleCompleted();
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -248,7 +249,7 @@ public class SyncVariableDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -357,7 +358,7 @@ public class SyncVariableDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -456,7 +457,7 @@ public class SyncVariableDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */
@ -546,7 +547,7 @@ public class SyncVariableDataAccess {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
/* /*
* All good set return value. * All good set return value.
*/ */

View file

@ -226,7 +226,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
// fail if the state of the service changed during the request, but the view model // fail if the state of the service changed during the request, but the view model
// has not been updated yet. // has not been updated yet.
if (!getStatus().isOK()) { if (!isSuccess()) {
assert getStatus().isOK() || assert getStatus().isOK() ||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR || getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED; getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;
@ -380,7 +380,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
@ -567,7 +567,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<IExpressionDMContext[]>(dsfExecutor, null) { new DataRequestMonitor<IExpressionDMContext[]>(dsfExecutor, null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
@ -645,7 +645,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
// IExpressionDMContext object for each local variable name, saving them all // IExpressionDMContext object for each local variable name, saving them all
// in an array. // in an array.
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }

View file

@ -428,7 +428,7 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
fRetrieval.getContext(), address, 0, fWordSize, (int) length, fRetrieval.getContext(), address, 0, fWordSize, (int) length,
new DataRequestMonitor<MemoryByte[]>(fRetrieval.getExecutor(), drm) { new DataRequestMonitor<MemoryByte[]>(fRetrieval.getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
drm.setData(getData()); drm.setData(getData());
drm.done(); drm.done();
} }

View file

@ -481,7 +481,7 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl
valueDmc, valueDmc,
new DataRequestMonitor<FormattedValueDMData>(getExecutor(), drm) { new DataRequestMonitor<FormattedValueDMData>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Store the result // Store the result
FormattedValueDMData data = getData(); FormattedValueDMData data = getData();
String value = data.getFormattedValue().substring(2); // Strip the "0x" String value = data.getFormattedValue().substring(2); // Strip the "0x"

View file

@ -135,7 +135,7 @@ public class BreakpointsMediator extends AbstractDsfService implements IBreakpoi
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
}}); }});
} }
@ -426,7 +426,7 @@ public class BreakpointsMediator extends AbstractDsfService implements IBreakpoi
breakpointIDs.put(breakpoint, list); breakpointIDs.put(breakpoint, list);
} }
if (getStatus().isOK()) { if (isSuccess()) {
// Add the breakpoint back-end mapping // Add the breakpoint back-end mapping
list.add(getData()); list.add(getData());
} else { } else {
@ -619,7 +619,7 @@ public class BreakpointsMediator extends AbstractDsfService implements IBreakpoi
context, attrs, context, attrs,
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), countingRM) { new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), countingRM) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
newBpContexts.add(getData()); newBpContexts.add(getData());
countingRM.done(); countingRM.done();
} }
@ -639,7 +639,7 @@ public class BreakpointsMediator extends AbstractDsfService implements IBreakpoi
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), countingRM) { new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), countingRM) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
newBpContexts.add(getData()); newBpContexts.add(getData());
} else { } else {
// TODO (bug 219841): need to add breakpoint error status tracking // TODO (bug 219841): need to add breakpoint error status tracking
@ -658,7 +658,7 @@ public class BreakpointsMediator extends AbstractDsfService implements IBreakpoi
oldBpContexts.get(i), newAttrsList.get(i), oldBpContexts.get(i), newAttrsList.get(i),
new RequestMonitor(getExecutor(), countingRM) { new RequestMonitor(getExecutor(), countingRM) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
newBpContexts.add(bpCtx); newBpContexts.add(bpCtx);
countingRM.done(); countingRM.done();
} }
@ -807,7 +807,7 @@ public class BreakpointsMediator extends AbstractDsfService implements IBreakpoi
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
if (getStatus().getSeverity() == IStatus.ERROR) { if (getStatus().getSeverity() == IStatus.ERROR) {
DsfDebugPlugin.getDefault().getLog().log(getStatus()); DsfDebugPlugin.getDefault().getLog().log(getStatus());
} }

View file

@ -88,7 +88,7 @@ public class StepQueueManager extends AbstractDsfService
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
}}); }});
} }

View file

@ -369,7 +369,7 @@ public class CommandCache implements ICommandListener
fCachedContexts.put(context, map); fCachedContexts.put(context, map);
} }
if (!status.isOK()) { if (!isSuccess()) {
/* /*
* We had some form of error with the original command. So notify the * We had some form of error with the original command. So notify the

View file

@ -220,7 +220,7 @@ public class DsfMISourceLookupParticipant implements ISourceLookupParticipant {
stackService.getFrameData( stackService.getFrameData(
frameDmc, frameDmc,
new DataRequestMonitor<IFrameDMData>(fExecutor, rm) { @Override new DataRequestMonitor<IFrameDMData>(fExecutor, rm) { @Override
public void handleOK() { public void handleSuccess() {
rm.setData(getData().getFile()); rm.setData(getData().getFile());
rm.done(); rm.done();
}}); }});

View file

@ -37,7 +37,7 @@ public class ViewerCountingRequestMonitor extends CountingRequestMonitor {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
fUpdate.done(); fUpdate.done();
} }

View file

@ -35,7 +35,7 @@ public class ViewerDataRequestMonitor<V> extends DataRequestMonitor<V> {
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
fUpdate.done(); fUpdate.done();
} }

View file

@ -203,7 +203,7 @@ abstract public class AbstractVMProvider implements IVMProvider
new DataRequestMonitor<IModelDelta>(getExecutor(), null) { new DataRequestMonitor<IModelDelta>(getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
proxyStrategy.fireModelChanged(getData()); proxyStrategy.fireModelChanged(getData());
} }
} }
@ -330,7 +330,7 @@ abstract public class AbstractVMProvider implements IVMProvider
update, update,
new ViewerDataRequestMonitor<Boolean>(getExecutor(), updates[i]) { new ViewerDataRequestMonitor<Boolean>(getExecutor(), updates[i]) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
update.setHasChilren(getData()); update.setHasChilren(getData());
update.done(); update.done();
} }
@ -344,7 +344,7 @@ abstract public class AbstractVMProvider implements IVMProvider
update, -1, -1, update, -1, -1,
new ViewerDataRequestMonitor<List<Object>>(getExecutor(), update) { new ViewerDataRequestMonitor<List<Object>>(getExecutor(), update) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
update.setHasChilren( !getData().isEmpty() ); update.setHasChilren( !getData().isEmpty() );
update.done(); update.done();
} }
@ -376,7 +376,7 @@ abstract public class AbstractVMProvider implements IVMProvider
update, update,
new ViewerDataRequestMonitor<Integer>(getExecutor(), update) { new ViewerDataRequestMonitor<Integer>(getExecutor(), update) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
update.setChildCount(getData()); update.setChildCount(getData());
update.done(); update.done();
} }
@ -390,7 +390,7 @@ abstract public class AbstractVMProvider implements IVMProvider
update, -1, -1, update, -1, -1,
new ViewerDataRequestMonitor<List<Object>>(getExecutor(), update) { new ViewerDataRequestMonitor<List<Object>>(getExecutor(), update) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
update.setChildCount( getData().size() ); update.setChildCount( getData().size() );
update.done(); update.done();
} }

View file

@ -125,10 +125,10 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
// Status is OK, only if all request monitors are OK. // Status is OK, only if all request monitors are OK.
if (getStatus().isOK()) { if (isSuccess()) {
boolean isContainer = false; boolean isContainer = false;
for (DataRequestMonitor<Boolean> hasElementsDone : getRequestMonitors()) { for (DataRequestMonitor<Boolean> hasElementsDone : getRequestMonitors()) {
isContainer |= hasElementsDone.getStatus().isOK() && isContainer |= hasElementsDone.isSuccess() &&
hasElementsDone.getData().booleanValue(); hasElementsDone.getData().booleanValue();
} }
update.setHasChilren(isContainer); update.setHasChilren(isContainer);
@ -178,7 +178,7 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
new DataRequestMonitor<Integer[]>(getVMProvider().getExecutor(), null) { new DataRequestMonitor<Integer[]>(getVMProvider().getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
int numChildren = 0; int numChildren = 0;
for (Integer count : getData()) { for (Integer count : getData()) {
numChildren += count.intValue(); numChildren += count.intValue();
@ -216,7 +216,7 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
new DataRequestMonitor<Integer[]>(getVMProvider().getExecutor(), null) { new DataRequestMonitor<Integer[]>(getVMProvider().getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
update.done(); update.done();
return; return;
} }
@ -251,7 +251,7 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
final MultiRequestMonitor<RequestMonitor> childrenCountMultiReqMon = final MultiRequestMonitor<RequestMonitor> childrenCountMultiReqMon =
new MultiRequestMonitor<RequestMonitor>(getVMProvider().getExecutor(), rm) { new MultiRequestMonitor<RequestMonitor>(getVMProvider().getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(counts); rm.setData(counts);
rm.done(); rm.done();
} }
@ -266,7 +266,7 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
childrenCountMultiReqMon.add( childrenCountMultiReqMon.add(
new DataRequestMonitor<Integer>(getVMProvider().getExecutor(), null) { new DataRequestMonitor<Integer>(getVMProvider().getExecutor(), null) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
counts[nodeIndex] = getData(); counts[nodeIndex] = getData();
} }

View file

@ -250,7 +250,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
getRootElement(), event, getRootElement(), event,
new DataRequestMonitor<VMDelta>(getVMProvider().getExecutor(), rm) { new DataRequestMonitor<VMDelta>(getVMProvider().getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Find the root delta for the whole view to use when firing the delta. // Find the root delta for the whole view to use when firing the delta.
// Note: the view root is going to be different than the model root // Note: the view root is going to be different than the model root
// in case when the view model provider is registered to populate only // in case when the view model provider is registered to populate only
@ -272,7 +272,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
childNodesWithDeltaFlags, getData(), event, childNodesWithDeltaFlags, getData(), event,
new RequestMonitor(getVMProvider().getExecutor(), rm) { new RequestMonitor(getVMProvider().getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(viewRootDelta); rm.setData(viewRootDelta);
rm.done(); rm.done();
} }
@ -290,7 +290,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
new DataRequestMonitor<IVMContext[]>(getVMProvider().getExecutor(), rm) { new DataRequestMonitor<IVMContext[]>(getVMProvider().getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
assert getData() != null; assert getData() != null;
buildChildDeltasForEventContext(getData(), node, event, parentDelta, nodeOffset, rm); buildChildDeltasForEventContext(getData(), node, event, parentDelta, nodeOffset, rm);
} else if (getStatus().getCode() == IDsfStatusConstants.NOT_SUPPORTED) { } else if (getStatus().getCode() == IDsfStatusConstants.NOT_SUPPORTED) {
@ -341,7 +341,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
// Check for an empty list of elements. If it's empty then we // Check for an empty list of elements. If it's empty then we
// don't have to call the children nodes, so return here. // don't have to call the children nodes, so return here.
// No need to propagate error, there's no means or need to display it. // No need to propagate error, there's no means or need to display it.
if (!getStatus().isOK() || getData().isEmpty()) { if (!isSuccess() || getData().isEmpty()) {
requestMonitor.done(); requestMonitor.done();
return; return;
} }
@ -525,7 +525,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
event, delta, nodeOffset, event, delta, nodeOffset,
new RequestMonitor(getVMProvider().getExecutor(), multiRm) { new RequestMonitor(getVMProvider().getExecutor(), multiRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
buildChildDeltas( buildChildDeltas(
childNode, event, delta, nodeOffset, new RequestMonitor(getVMProvider().getExecutor(), multiRm)); childNode, event, delta, nodeOffset, new RequestMonitor(getVMProvider().getExecutor(), multiRm));
} }
@ -568,7 +568,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
super.handleCompleted(); super.handleCompleted();
} }
@Override @Override
protected void handleOK() { protected void handleSuccess() {
Map<IVMNode, Integer> data = new HashMap<IVMNode, Integer>(); Map<IVMNode, Integer> data = new HashMap<IVMNode, Integer>();
int offset = 0; int offset = 0;
for (int i = 0; i < childNodes.length; i++) { for (int i = 0; i < childNodes.length; i++) {

View file

@ -192,7 +192,7 @@ public class PropertyBasedLabelProvider
new DataRequestMonitor<Map<String, Object>>(ImmediateExecutor.getInstance(), null) { new DataRequestMonitor<Map<String, Object>>(ImmediateExecutor.getInstance(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
updateLabel(labelUpdate, getData()); updateLabel(labelUpdate, getData());
} }
labelUpdate.done(); labelUpdate.done();

View file

@ -298,7 +298,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
new VMHasChildrenUpdate(update, new DataRequestMonitor<Boolean>(getExecutor(), null) { new VMHasChildrenUpdate(update, new DataRequestMonitor<Boolean>(getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if(getStatus().isOK()) { if(isSuccess()) {
entry.fHasChildren = this.getData(); entry.fHasChildren = this.getData();
update.setHasChilren(getData()); update.setHasChilren(getData());
} else { } else {
@ -326,7 +326,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
IChildrenCountUpdate updateProxy = new VMChildrenCountUpdate(update, new DataRequestMonitor<Integer>(getExecutor(), null) { IChildrenCountUpdate updateProxy = new VMChildrenCountUpdate(update, new DataRequestMonitor<Integer>(getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if(getStatus().isOK()) { if(isSuccess()) {
entry.fChildrenCount = this.getData(); entry.fChildrenCount = this.getData();
update.setChildCount(getData()); update.setChildCount(getData());
} else { } else {
@ -360,7 +360,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
// The viewer may request more children then there are at a given level. // The viewer may request more children then there are at a given level.
// This causes the update to return with an error. // This causes the update to return with an error.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=202109 // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=202109
// Instead of checking getStatus().isOK(), check getData() != null. // Instead of checking isSuccess(), check getData() != null.
if(getData() != null) { if(getData() != null) {
// Check if the udpate retrieved all children by specifying "offset = -1, length = -1" // Check if the udpate retrieved all children by specifying "offset = -1, length = -1"
int updateOffset = update.getOffset(); int updateOffset = update.getOffset();
@ -578,7 +578,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
proxyStrategy.fireModelChanged(getData()); proxyStrategy.fireModelChanged(getData());
} }
} }
@ -731,7 +731,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
new DataRequestMonitor<IDMData>(executor, rm) { new DataRequestMonitor<IDMData>(executor, rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
entry.fDataOrStatus.put(dmc, getData()); entry.fDataOrStatus.put(dmc, getData());
rm.setData(getData()); rm.setData(getData());
} else { } else {

View file

@ -114,7 +114,7 @@ abstract public class Query<V> extends DsfRunnable
execute(new DataRequestMonitor<V>(ImmediateExecutor.getInstance(), null) { execute(new DataRequestMonitor<V>(ImmediateExecutor.getInstance(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (getStatus().isOK()) fSync.doSet(getData()); if (isSuccess()) fSync.doSet(getData());
else fSync.doSetException(new CoreException(getStatus())); else fSync.doSetException(new CoreException(getStatus()));
} }
}); });

View file

@ -33,12 +33,28 @@ import org.eclipse.dd.dsf.internal.DsfPlugin;
* as an argument. * as an argument.
* </p> * </p>
* <p> * <p>
* This class handles an optional "parent" request monitor. If a parent monitor is * The severity of the {@link IStatus> returned by #getStatus() can be used to
* specified, it will automatically be invoked by this monitor when the request is * determine the success or failure of the asynchronous operation. By convention
* completed. The parent option is useful when implementing a method which is * the error codes returned by asynchronous method should be interpreted as follows:
* asynchronous (and accepts a request monitor as an argument) and which itself calls * <ul>
* another asynchronous method to complete its operation. For example, in the request * <li>OK and INFO - Result is a success. In DataRequestMonitor, getData() should
* monitor implementation below, the implementation only needs to override * return a value.</li>
* <li>WARNING - Acceptable error condition (getData() may return null). Where for
* example user tried to retrieve variable data, but the program resumed in the
* mean time and an event will be generated shortly which will clear the variables
* view.</li>
* <li>ERROR - An error condition that should probably be reported to the user.</li>
* <li>CANCEL - The request was canceled, and the asynchronous method was not
* completed.</li>
* </ul>
* </p>
* <p>
* The RequestMonitor constructor accepts an optional "parent" request monitor. If a
* parent monitor is specified, it will automatically be invoked by this monitor when
* the request is completed. The parent option is useful when implementing a method
* which is asynchronous (and accepts a request monitor as an argument) and which itself
* calls another asynchronous method to complete its operation. For example, in the
* request monitor implementation below, the implementation only needs to override
* <code>handleOK()</code>, because the base implementation will handle notifying the * <code>handleOK()</code>, because the base implementation will handle notifying the
* parent <code>rm</code> in case the <code>getIngredients()</code> call fails. * parent <code>rm</code> in case the <code>getIngredients()</code> call fails.
* <pre> * <pre>
@ -54,7 +70,7 @@ import org.eclipse.dd.dsf.internal.DsfPlugin;
* </pre> * </pre>
* </p> * </p>
*/ */
@ConfinedToDsfExecutor("") @ThreadSafe
public class RequestMonitor { public class RequestMonitor {
/** /**
@ -132,9 +148,17 @@ public class RequestMonitor {
/** /**
* Sets this request monitor as canceled and calls the cancel listeners if any. * Sets this request monitor as canceled and calls the cancel listeners if any.
* The operation may still be carried out as it is up to the implementation of * <p>
* the asynchronous operation to cancel the operation. Even after the request * Note: Calling cancel() does not automatically complete the RequestMonitor.
* monitor is canceled, the done() method still has to be called. * The asynchronous call still has to call done().
* </p>
* <p>
* Note: logically a request should only be canceled by the client that issued
* the request in the first place. After a request is canceled, the method
* that is fulfilling the request may call {@link #setStatus(IStatus)} with
* severity of <code>IStatus.CANCEL</code> to indicate that it recognized that
* the given request was canceled and it did not perform the given operation.
* </p>
*/ */
public void cancel() { public void cancel() {
Object[] listeners = null; Object[] listeners = null;
@ -180,10 +204,9 @@ public class RequestMonitor {
* when this request monitor is canceled. * when this request monitor is canceled.
*/ */
public synchronized void removeCancelListener(ICanceledListener listener) { public synchronized void removeCancelListener(ICanceledListener listener) {
if (fCancelListeners == null) { if (fCancelListeners != null) {
fCancelListeners = new ListenerList(); fCancelListeners.remove(listener);
} }
fCancelListeners.remove(listener);
} }
/** /**
@ -219,19 +242,29 @@ public class RequestMonitor {
public String toString() { public String toString() {
return "RequestMonitor (" + super.toString() + "): " + getStatus().toString(); //$NON-NLS-1$ //$NON-NLS-2$ return "RequestMonitor (" + super.toString() + "): " + getStatus().toString(); //$NON-NLS-1$ //$NON-NLS-2$
} }
/**
* Checks whether the given request monitor completed with success or
* failure result. If the request monitor was canceled it is considered
* that it failed, regardless of the status.
*/
public boolean isSuccess() {
return !isCanceled() && getStatus().getSeverity() <= IStatus.INFO;
}
/** /**
* Default handler for the completion of a request. The implementation * Default handler for the completion of a request. The implementation
* calls {@link #handleOK()} if the request succeeded, and calls * calls {@link #handleSuccess()} if the request succeeded, and calls
* {@link #handleNotOK()} or cancel otherwise. * {@link #handleFailure()} or cancel otherwise.
* <br> * <br>
* Note: Sub-classes may override this method. * Note: Sub-classes may override this method.
*/ */
@ConfinedToDsfExecutor("fExecutor")
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().getSeverity() <= IStatus.INFO) { if (isSuccess()) {
handleOK(); handleSuccess();
} else { } else {
handleNotOK(); handleFailure();
} }
} }
@ -239,11 +272,12 @@ public class RequestMonitor {
* Default handler for a successful the completion of a request. If this * Default handler for a successful the completion of a request. If this
* monitor has a parent monitor that was configured by the constructor, that * monitor has a parent monitor that was configured by the constructor, that
* parent monitor is notified. Otherwise this method does nothing. * parent monitor is notified. Otherwise this method does nothing.
* {@link #handleNotOK()} or cancel otherwise. * {@link #handleFailure()} or cancel otherwise.
* <br> * <br>
* Note: Sub-classes may override this method. * Note: Sub-classes may override this method.
*/ */
protected void handleOK() { @ConfinedToDsfExecutor("fExecutor")
protected void handleSuccess() {
if (fParentRequestMonitor != null) { if (fParentRequestMonitor != null) {
fParentRequestMonitor.done(); fParentRequestMonitor.done();
} }
@ -256,7 +290,8 @@ public class RequestMonitor {
* <br> * <br>
* Note: Sub-classes may override this method. * Note: Sub-classes may override this method.
*/ */
protected void handleNotOK() { @ConfinedToDsfExecutor("fExecutor")
protected void handleFailure() {
assert !getStatus().isOK(); assert !getStatus().isOK();
if (isCanceled()) { if (isCanceled()) {
handleCancel(); handleCancel();
@ -278,6 +313,7 @@ public class RequestMonitor {
* <br> * <br>
* Note: Sub-classes may override this method. * Note: Sub-classes may override this method.
*/ */
@ConfinedToDsfExecutor("fExecutor")
protected void handleErrorOrWarning() { protected void handleErrorOrWarning() {
if (getStatus().getSeverity() == IStatus.ERROR) { if (getStatus().getSeverity() == IStatus.ERROR) {
handleError(); handleError();
@ -294,6 +330,7 @@ public class RequestMonitor {
* <br> * <br>
* Note: Sub-classes may override this method. * Note: Sub-classes may override this method.
*/ */
@ConfinedToDsfExecutor("fExecutor")
protected void handleError() { protected void handleError() {
if (fParentRequestMonitor != null) { if (fParentRequestMonitor != null) {
fParentRequestMonitor.setStatus(getStatus()); fParentRequestMonitor.setStatus(getStatus());
@ -313,14 +350,11 @@ public class RequestMonitor {
* <br> * <br>
* Note: Sub-classes may override this method. * Note: Sub-classes may override this method.
*/ */
@ConfinedToDsfExecutor("fExecutor")
protected void handleWarning() { protected void handleWarning() {
if (fParentRequestMonitor != null) { if (fParentRequestMonitor != null) {
fParentRequestMonitor.setStatus(getStatus()); fParentRequestMonitor.setStatus(getStatus());
fParentRequestMonitor.done(); fParentRequestMonitor.done();
} else {
MultiStatus logStatus = new MultiStatus(DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Request for monitor: '" + toString() + "' resulted in a warning.", null); //$NON-NLS-1$ //$NON-NLS-2$
logStatus.merge(getStatus());
DsfPlugin.getDefault().getLog().log(logStatus);
} }
} }
@ -331,9 +365,15 @@ public class RequestMonitor {
* <br> * <br>
* Note: Sub-classes may override this method. * Note: Sub-classes may override this method.
*/ */
@ConfinedToDsfExecutor("fExecutor")
protected void handleCancel() { protected void handleCancel() {
if (fParentRequestMonitor != null) { if (fParentRequestMonitor != null) {
fParentRequestMonitor.setStatus(getStatus()); if (getStatus().getSeverity() == IStatus.CANCEL && !fParentRequestMonitor.isCanceled()) {
fParentRequestMonitor.setStatus(new Status(
IStatus.ERROR, DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Sub-request " + toString() + " was canceled and not handled.'", null)); //$NON-NLS-1$ //$NON-NLS-2$
} else {
fParentRequestMonitor.setStatus(getStatus());
}
fParentRequestMonitor.done(); fParentRequestMonitor.done();
} }
} }
@ -343,6 +383,7 @@ public class RequestMonitor {
* rejects the runnable that is submitted invoke this request monitor. * rejects the runnable that is submitted invoke this request monitor.
* This usually happens only when the executor is shutting down. * This usually happens only when the executor is shutting down.
*/ */
@ThreadSafe
protected void handleRejectedExecutionException() { protected void handleRejectedExecutionException() {
MultiStatus logStatus = new MultiStatus(DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Request for monitor: '" + toString() + "' resulted in a rejected execution exception.", null); //$NON-NLS-1$ //$NON-NLS-2$ MultiStatus logStatus = new MultiStatus(DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Request for monitor: '" + toString() + "' resulted in a rejected execution exception.", null); //$NON-NLS-1$ //$NON-NLS-2$
logStatus.merge(getStatus()); logStatus.merge(getStatus());

View file

@ -275,7 +275,7 @@ abstract public class Sequence extends DsfRunnable implements Future<Object> {
assert fStepIdx == fCurrentStepIdx; assert fStepIdx == fCurrentStepIdx;
// Proceed to the next step. // Proceed to the next step.
if (getStatus().isOK()) { if (isSuccess()) {
fProgressMonitor.worked(getSteps()[fStepIdx].getTicks()); fProgressMonitor.worked(getSteps()[fStepIdx].getTicks());
executeStep(fStepIdx + 1); executeStep(fStepIdx + 1);
} else { } else {
@ -329,7 +329,7 @@ abstract public class Sequence extends DsfRunnable implements Future<Object> {
assert fStepIdx == fCurrentStepIdx; assert fStepIdx == fCurrentStepIdx;
// Proceed to the next step. // Proceed to the next step.
if (getStatus().isOK()) { if (isSuccess()) {
fProgressMonitor.worked(getSteps()[fStepIdx].getTicks()); fProgressMonitor.worked(getSteps()[fStepIdx].getTicks());
rollBackStep(fStepIdx - 1); rollBackStep(fStepIdx - 1);
} else { } else {

View file

@ -171,7 +171,7 @@ public class AsyncDataViewer
fItemDataRequestMonitors.remove(this); fItemDataRequestMonitors.remove(this);
// Check if the request completed successfully, otherwise ignore it. // Check if the request completed successfully, otherwise ignore it.
if (getStatus().isOK()) { if (isSuccess()) {
if (!fViewer.getTable().isDisposed()) { if (!fViewer.getTable().isDisposed()) {
fViewer.replace(getData(), fIndex); fViewer.replace(getData(), fIndex);
} }

View file

@ -204,7 +204,7 @@ public class PDAProgramVMNode extends AbstractDMVMNode
@Override @Override
public void handleCompleted(){ public void handleCompleted(){
// If the request failed, fail the udpate. // If the request failed, fail the udpate.
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }

View file

@ -230,7 +230,7 @@ implements ITerminate
@Override @Override
public void handleCompleted() { public void handleCompleted() {
fSession.removeServiceEventListener(PDALaunch.this); fSession.removeServiceEventListener(PDALaunch.this);
if (!getStatus().isOK()) { if (!isSuccess()) {
PDAPlugin.getDefault().getLog().log(new MultiStatus( PDAPlugin.getDefault().getLog().log(new MultiStatus(
PDAPlugin.PLUGIN_ID, -1, new IStatus[]{getStatus()}, "Session shutdown failed", null)); //$NON-NLS-1$ PDAPlugin.PLUGIN_ID, -1, new IStatus[]{getStatus()}, "Session shutdown failed", null)); //$NON-NLS-1$
} }

View file

@ -76,7 +76,7 @@ public class PDAServicesInitSequence extends Sequence {
fSession, new PDABreakpointAttributeTranslator()); fSession, new PDABreakpointAttributeTranslator());
bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) { bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
bpmService.startTrackingBreakpoints(fCommandControl.getProgramDMContext(), requestMonitor); bpmService.startTrackingBreakpoints(fCommandControl.getProgramDMContext(), requestMonitor);
} }
}); });

View file

@ -127,7 +127,7 @@ public class PDAServicesShutdownSequence extends Sequence {
service.shutdown(new RequestMonitor(getExecutor(), requestMonitor) { service.shutdown(new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
PDAPlugin.getDefault().getLog().log(getStatus()); PDAPlugin.getDefault().getLog().log(getStatus());
} }
requestMonitor.done(); requestMonitor.done();

View file

@ -134,7 +134,7 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
public void initialize(final RequestMonitor rm) { public void initialize(final RequestMonitor rm) {
super.initialize(new RequestMonitor(getExecutor(), rm) { super.initialize(new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
} }
}); });
@ -247,17 +247,17 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
new PDASetBreakpointCommand(fCommandControl.getProgramDMContext(), line), new PDASetBreakpointCommand(fCommandControl.getProgramDMContext(), line),
new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(breakpointCtx); rm.setData(breakpointCtx);
rm.done(); rm.done();
} }
@Override @Override
protected void handleNotOK() { protected void handleFailure() {
// If inserting of the breakpoint failed, remove it from // If inserting of the breakpoint failed, remove it from
// the set of installed breakpoints. // the set of installed breakpoints.
fBreakpoints.remove(breakpointCtx); fBreakpoints.remove(breakpointCtx);
super.handleNotOK(); super.handleFailure();
} }
}); });
} }
@ -313,17 +313,17 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
new PDAWatchCommand(fCommandControl.getProgramDMContext(), function, variable, watchOperation), new PDAWatchCommand(fCommandControl.getProgramDMContext(), function, variable, watchOperation),
new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(watchpointCtx); rm.setData(watchpointCtx);
rm.done(); rm.done();
} }
@Override @Override
protected void handleNotOK() { protected void handleFailure() {
// Since the command failed, we need to remove the breakpoint from // Since the command failed, we need to remove the breakpoint from
// the existing breakpoint set. // the existing breakpoint set.
fBreakpoints.remove(watchpointCtx); fBreakpoints.remove(watchpointCtx);
super.handleNotOK(); super.handleFailure();
} }
}); });
} }
@ -389,7 +389,7 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
attributes, attributes,
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), rm) { new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// The inserted watchpoint context will equal the // The inserted watchpoint context will equal the
// current context. // current context.
assert bpCtx.equals(getData()); assert bpCtx.equals(getData());

View file

@ -116,7 +116,7 @@ public class PDACommandControl extends AbstractDsfService implements ICommandCon
// Call the super-class to perform initialization first. // Call the super-class to perform initialization first.
super.initialize( new RequestMonitor(getExecutor(), rm) { super.initialize( new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
} }
}); });
@ -141,7 +141,7 @@ public class PDACommandControl extends AbstractDsfService implements ICommandCon
// completed. // completed.
final RequestMonitor socketsInitializeRm = new RequestMonitor(getExecutor(), rm) { final RequestMonitor socketsInitializeRm = new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Register the service with OSGi as the last step in initialization of // Register the service with OSGi as the last step in initialization of
// the service. // the service.
register( register(

View file

@ -181,7 +181,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
}}); }});
} }
@ -284,7 +284,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
frameCtx, 0, frameCtx, 0,
new DataRequestMonitor<Integer>(getExecutor(), rm) { new DataRequestMonitor<Integer>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Calculate the frame index. // Calculate the frame index.
int frameId = getData() - frameCtx.getLevel() - 1; int frameId = getData() - frameCtx.getLevel() - 1;
@ -293,7 +293,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
new PDAVarCommand(fCommandControl.getProgramDMContext(), frameId, exprCtx.getExpression()), new PDAVarCommand(fCommandControl.getProgramDMContext(), frameId, exprCtx.getExpression()),
new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(new FormattedValueDMData(getData().fResponseText)); rm.setData(new FormattedValueDMData(getData().fResponseText));
rm.done(); rm.done();
} }
@ -318,7 +318,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
frameCtx, 0, frameCtx, 0,
new DataRequestMonitor<Integer>(getExecutor(), rm) { new DataRequestMonitor<Integer>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Calculate the frame index. // Calculate the frame index.
int frameId = getData() - frameCtx.getLevel() - 1; int frameId = getData() - frameCtx.getLevel() - 1;
@ -327,7 +327,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
new PDASetVarCommand(fCommandControl.getProgramDMContext(), frameId, exprCtx.getExpression(), exprValue), new PDASetVarCommand(fCommandControl.getProgramDMContext(), frameId, exprCtx.getExpression(), exprValue),
new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getSession().dispatchEvent(new ExpressionChangedDMEvent(exprCtx), getProperties()); getSession().dispatchEvent(new ExpressionChangedDMEvent(exprCtx), getProperties());
rm.done(); rm.done();
} }

View file

@ -136,7 +136,7 @@ public class PDARunControl extends AbstractDsfService
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
}}); }});
} }
@ -244,11 +244,11 @@ public class PDARunControl extends AbstractDsfService
new PDAResumeCommand(fCommandControl.getProgramDMContext()), new PDAResumeCommand(fCommandControl.getProgramDMContext()),
new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleNotOK() { protected void handleFailure() {
// If the resume command failed, we no longer // If the resume command failed, we no longer
// expect to receive a resumed event. // expect to receive a resumed event.
fResumePending = false; fResumePending = false;
super.handleNotOK(); super.handleFailure();
} }
} }
); );
@ -285,7 +285,7 @@ public class PDARunControl extends AbstractDsfService
new PDAStepCommand(fCommandControl.getProgramDMContext()), new PDAStepCommand(fCommandControl.getProgramDMContext()),
new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleNotOK() { protected void handleFailure() {
// If the step command failed, we no longer // If the step command failed, we no longer
// expect to receive a resumed event. // expect to receive a resumed event.
fResumePending = false; fResumePending = false;

View file

@ -184,7 +184,7 @@ public class PDAStack extends AbstractDsfService implements IStack {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
}}); }});
} }
@ -224,7 +224,7 @@ public class PDAStack extends AbstractDsfService implements IStack {
new PDAStackCommand(fCommandControl.getProgramDMContext()), new PDAStackCommand(fCommandControl.getProgramDMContext()),
new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// PDAFrame array is ordered highest to lowest. We need to // PDAFrame array is ordered highest to lowest. We need to
// calculate the index based on frame level. // calculate the index based on frame level.
int frameId = getData().fFrames.length - frameCtx.getLevel() - 1; int frameId = getData().fFrames.length - frameCtx.getLevel() - 1;
@ -257,7 +257,7 @@ public class PDAStack extends AbstractDsfService implements IStack {
new PDAStackCommand(fCommandControl.getProgramDMContext()), new PDAStackCommand(fCommandControl.getProgramDMContext()),
new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
IFrameDMContext[] frameCtxs = new IFrameDMContext[getData().fFrames.length]; IFrameDMContext[] frameCtxs = new IFrameDMContext[getData().fFrames.length];
for (int i = 0; i < getData().fFrames.length; i++) { for (int i = 0; i < getData().fFrames.length; i++) {
frameCtxs[i] = new FrameDMContext(getSession().getId(), execCtx, i); frameCtxs[i] = new FrameDMContext(getSession().getId(), execCtx, i);
@ -274,7 +274,7 @@ public class PDAStack extends AbstractDsfService implements IStack {
new PDAStackCommand(fCommandControl.getProgramDMContext()), new PDAStackCommand(fCommandControl.getProgramDMContext()),
new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Find the correct PDAFrame // Find the correct PDAFrame
int frameId = getData().fFrames.length - frameCtx.getLevel() - 1; int frameId = getData().fFrames.length - frameCtx.getLevel() - 1;
if (frameId < 0) { if (frameId < 0) {
@ -301,7 +301,7 @@ public class PDAStack extends AbstractDsfService implements IStack {
new PDAStackCommand(fCommandControl.getProgramDMContext()), new PDAStackCommand(fCommandControl.getProgramDMContext()),
new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) { new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(getData().fFrames.length); rm.setData(getData().fFrames.length);
rm.done(); rm.done();
} }

View file

@ -216,7 +216,7 @@ public class FinalLaunchSequence extends Sequence {
true, false, null, 0, fStopSymbol, 0), true, false, null, 0, fStopSymbol, 0),
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) { new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// After the break-insert is done, execute the -exec-run or -exec-continue command. // After the break-insert is done, execute the -exec-run or -exec-continue command.
fCommandControl.queueCommand(execCommand, new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor)); fCommandControl.queueCommand(execCommand, new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));

View file

@ -144,7 +144,7 @@ public class GdbLaunch extends Launch
@Override @Override
public void handleCompleted() { public void handleCompleted() {
fSession.removeServiceEventListener(GdbLaunch.this); fSession.removeServiceEventListener(GdbLaunch.this);
if (!getStatus().isOK()) { if (!isSuccess()) {
GdbLaunchPlugin.getDefault().getLog().log(new MultiStatus( GdbLaunchPlugin.getDefault().getLog().log(new MultiStatus(
GdbLaunchPlugin.PLUGIN_ID, -1, new IStatus[]{getStatus()}, "Session shutdown failed", null)); //$NON-NLS-1$ GdbLaunchPlugin.PLUGIN_ID, -1, new IStatus[]{getStatus()}, "Session shutdown failed", null)); //$NON-NLS-1$
} }

View file

@ -165,7 +165,7 @@ public class ShutdownSequence extends Sequence {
service.shutdown(new RequestMonitor(getExecutor(), requestMonitor) { service.shutdown(new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
GdbLaunchPlugin.getDefault().getLog().log(getStatus()); GdbLaunchPlugin.getDefault().getLog().log(getStatus());
} }
requestMonitor.done(); requestMonitor.done();

View file

@ -501,7 +501,7 @@ public class GdbThreadFilterEditor {
runControl.getThreadData((IMIExecutionDMContext) thread, new DataRequestMonitor<GDBThreadData>( runControl.getThreadData((IMIExecutionDMContext) thread, new DataRequestMonitor<GDBThreadData>(
ImmediateExecutor.getInstance(), rm) { ImmediateExecutor.getInstance(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
final StringBuilder builder = new StringBuilder("Thread["); //$NON-NLS-1$ final StringBuilder builder = new StringBuilder("Thread["); //$NON-NLS-1$
builder.append(((IMIExecutionDMContext)thread).getThreadId()); builder.append(((IMIExecutionDMContext)thread).getThreadId());
builder.append("] "); //$NON-NLS-1$ builder.append("] "); //$NON-NLS-1$

View file

@ -93,7 +93,7 @@ public class ContainerVMNode extends AbstractDMVMNode
new DataRequestMonitor<GDBProcessData>(getExecutor(), null) { new DataRequestMonitor<GDBProcessData>(getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
update.done(); update.done();
return; return;
} }

View file

@ -74,7 +74,7 @@ public class ThreadVMNode extends AbstractDMVMNode
new DataRequestMonitor<IExecutionDMContext[]>(getSession().getExecutor(), null){ new DataRequestMonitor<IExecutionDMContext[]>(getSession().getExecutor(), null){
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
handleFailedUpdate(update); handleFailedUpdate(update);
return; return;
} }
@ -120,7 +120,7 @@ public class ThreadVMNode extends AbstractDMVMNode
new DataRequestMonitor<VMContextInfo>(getExecutor(), rm) { new DataRequestMonitor<VMContextInfo>(getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
rm.setData(new IVMContext[] { getData().fVMContext }); rm.setData(new IVMContext[] { getData().fVMContext });
} else { } else {
rm.setData(new IVMContext[0]); rm.setData(new IVMContext[0]);
@ -149,7 +149,7 @@ public class ThreadVMNode extends AbstractDMVMNode
parentDelta, getVMProvider().getPresentationContext(), -1, -1, parentDelta, getVMProvider().getPresentationContext(), -1, -1,
new DataRequestMonitor<List<Object>>(getExecutor(), rm) { new DataRequestMonitor<List<Object>>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
try { try {
getSession().getExecutor().execute(new DsfRunnable() { getSession().getExecutor().execute(new DsfRunnable() {
public void run() { public void run() {
@ -231,7 +231,7 @@ public class ThreadVMNode extends AbstractDMVMNode
new DataRequestMonitor<GDBThreadData>(getSession().getExecutor(), null) { new DataRequestMonitor<GDBThreadData>(getSession().getExecutor(), null) {
@Override @Override
public void handleCompleted() { public void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
update.done(); update.done();
return; return;
} }
@ -294,7 +294,7 @@ public class ThreadVMNode extends AbstractDMVMNode
new DataRequestMonitor<VMContextInfo>(getExecutor(), rm) { new DataRequestMonitor<VMContextInfo>(getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
parentDelta.addNode( parentDelta.addNode(
getData().fVMContext, nodeOffset + getData().fIndex, getData().fVMContext, nodeOffset + getData().fIndex,
IModelDelta.EXPAND | (getData().fIsSuspended ? 0 : IModelDelta.SELECT)); IModelDelta.EXPAND | (getData().fIsSuspended ? 0 : IModelDelta.SELECT));

View file

@ -90,7 +90,7 @@ public class GDBRunControl extends MIRunControl {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
public void handleOK() { public void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
}}); }});
} }
@ -132,7 +132,7 @@ public class GDBRunControl extends MIRunControl {
DataRequestMonitor<IExecutionDMContext[]> rm1 = new DataRequestMonitor<IExecutionDMContext[]>( DataRequestMonitor<IExecutionDMContext[]> rm1 = new DataRequestMonitor<IExecutionDMContext[]>(
getExecutor(), rm) { getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
raiseExitEvents(getData()); raiseExitEvents(getData());
fOldExecutionCtxts = getData(); fOldExecutionCtxts = getData();
rm.setData(fOldExecutionCtxts); rm.setData(fOldExecutionCtxts);
@ -153,7 +153,7 @@ public class GDBRunControl extends MIRunControl {
getCache().execute(new CLIInfoThreads(containerDmc), getCache().execute(new CLIInfoThreads(containerDmc),
new DataRequestMonitor<CLIInfoThreadsInfo>(getExecutor(), rm) { new DataRequestMonitor<CLIInfoThreadsInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData( createThreadInfo(execDmc, getData()) ); rm.setData( createThreadInfo(execDmc, getData()) );
rm.done(); rm.done();
} }

View file

@ -120,7 +120,7 @@ public class GDBControl extends AbstractMIControl {
public void initialize(final RequestMonitor requestMonitor) { public void initialize(final RequestMonitor requestMonitor) {
super.initialize( new RequestMonitor(getExecutor(), requestMonitor) { super.initialize( new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });
@ -220,7 +220,7 @@ public class GDBControl extends AbstractMIControl {
public void handleCompleted() { public void handleCompleted() {
// Cancel the time out runnable (if it hasn't run yet). // Cancel the time out runnable (if it hasn't run yet).
quitTimeoutFuture.cancel(false); quitTimeoutFuture.cancel(false);
if (!getStatus().isOK() && !isGDBExited()) { if (!isSuccess() && !isGDBExited()) {
destroy(); destroy();
} }
rm.done(); rm.done();
@ -361,7 +361,7 @@ public class GDBControl extends AbstractMIControl {
protected void handleCompleted() { protected void handleCompleted() {
if (!fGDBLaunchMonitor.fTimedOut) { if (!fGDBLaunchMonitor.fTimedOut) {
fGDBLaunchMonitor.fLaunched = true; fGDBLaunchMonitor.fLaunched = true;
if (!getStatus().isOK()) { if (!isSuccess()) {
requestMonitor.setStatus(getStatus()); requestMonitor.setStatus(getStatus());
} }
requestMonitor.done(); requestMonitor.done();
@ -517,7 +517,7 @@ public class GDBControl extends AbstractMIControl {
new DataRequestMonitor<MIInfo>(getExecutor(), null) { new DataRequestMonitor<MIInfo>(getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
fUseInterpreterConsole = getStatus().isOK(); fUseInterpreterConsole = isSuccess();
requestMonitor.done(); requestMonitor.done();
} }
} }

View file

@ -113,7 +113,7 @@ public class CSourceLookup extends AbstractDsfService implements ISourceLookup {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
}}); }});
} }

View file

@ -418,7 +418,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
public void initialize(final RequestMonitor requestMonitor) { public void initialize(final RequestMonitor requestMonitor) {
super.initialize(new RequestMonitor(getExecutor(), requestMonitor) { super.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });
@ -588,7 +588,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetVar(dmc), new ExprMetaGetVar(dmc),
new DataRequestMonitor<ExprMetaGetVarInfo>(getExecutor(), rm) { new DataRequestMonitor<ExprMetaGetVarInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(new ExpressionDMData(getData().getExpr(), rm.setData(new ExpressionDMData(getData().getExpr(),
getData().getType(), getData().getNumChildren(), getData().getEditable())); getData().getType(), getData().getNumChildren(), getData().getEditable()));
rm.done(); rm.done();
@ -630,7 +630,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(addressDmc), new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(addressDmc),
new DataRequestMonitor<MIDataEvaluateExpressionInfo>(getExecutor(), rm) { new DataRequestMonitor<MIDataEvaluateExpressionInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
String tmpAddrStr = getData().getValue(); String tmpAddrStr = getData().getValue();
// Deal with adresses of contents of a char* which is in // Deal with adresses of contents of a char* which is in
@ -643,7 +643,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(sizeDmc), new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(sizeDmc),
new DataRequestMonitor<MIDataEvaluateExpressionInfo>(getExecutor(), rm) { new DataRequestMonitor<MIDataEvaluateExpressionInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
try { try {
int size = Integer.parseInt(getData().getValue()); int size = Integer.parseInt(getData().getValue());
rm.setData(new ExpressionDMAddress(addrStr, size)); rm.setData(new ExpressionDMAddress(addrStr, size));
@ -686,7 +686,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetValue(dmc), new ExprMetaGetValue(dmc),
new DataRequestMonitor<ExprMetaGetValueInfo>(getExecutor(), rm) { new DataRequestMonitor<ExprMetaGetValueInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(new FormattedValueDMData(getData().getValue())); rm.setData(new FormattedValueDMData(getData().getValue()));
rm.done(); rm.done();
} }
@ -723,7 +723,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetChildren(dmc), new ExprMetaGetChildren(dmc),
new DataRequestMonitor<ExprMetaGetChildrenInfo>(getExecutor(), rm) { new DataRequestMonitor<ExprMetaGetChildrenInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
ExpressionInfo[] childrenExpr = getData().getChildrenExpressions(); ExpressionInfo[] childrenExpr = getData().getChildrenExpressions();
IExpressionDMContext[] childArray = new IExpressionDMContext[childrenExpr.length]; IExpressionDMContext[] childArray = new IExpressionDMContext[childrenExpr.length];
for (int i=0; i<childArray.length; i++) { for (int i=0; i<childArray.length; i++) {
@ -766,7 +766,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
exprCtx, exprCtx,
new DataRequestMonitor<IExpressionDMContext[]>(getExecutor(), rm) { new DataRequestMonitor<IExpressionDMContext[]>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData((IExpressionDMContext[])Arrays.asList(getData()).subList(startIndex, startIndex + length).toArray()); rm.setData((IExpressionDMContext[])Arrays.asList(getData()).subList(startIndex, startIndex + length).toArray());
rm.done(); rm.done();
} }
@ -790,7 +790,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetChildCount(dmc), new ExprMetaGetChildCount(dmc),
new DataRequestMonitor<ExprMetaGetChildCountInfo>(getExecutor(), rm) { new DataRequestMonitor<ExprMetaGetChildCountInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(getData().getChildNum()); rm.setData(getData().getChildNum());
rm.done(); rm.done();
} }
@ -818,7 +818,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetAttributes(dmc), new ExprMetaGetAttributes(dmc),
new DataRequestMonitor<ExprMetaGetAttributesInfo>(getExecutor(), rm) { new DataRequestMonitor<ExprMetaGetAttributesInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(getData().getEditable()); rm.setData(getData().getEditable());
rm.done(); rm.done();
} }
@ -858,7 +858,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
formatId, formatId,
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// A value has changed, we should remove any references to that // A value has changed, we should remove any references to that
// value in our cache. Since we don't have such granularity, // value in our cache. Since we don't have such granularity,
// we must clear the entire cache. // we must clear the entire cache.

View file

@ -207,7 +207,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
public void initialize(final RequestMonitor rm) { public void initialize(final RequestMonitor rm) {
super.initialize(new RequestMonitor(getExecutor(), rm) { super.initialize(new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
} }
}); });
@ -309,7 +309,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
fConnection.queueCommand(new MIBreakList(context), fConnection.queueCommand(new MIBreakList(context),
new DataRequestMonitor<MIBreakListInfo>(getExecutor(), drm) { new DataRequestMonitor<MIBreakListInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Refresh the breakpoints map and format the result // Refresh the breakpoints map and format the result
breakpointContext.clear(); breakpointContext.clear();
MIBreakpoint[] breakpoints = getData().getMIBreakpoints(); MIBreakpoint[] breakpoints = getData().getMIBreakpoints();
@ -484,7 +484,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
DataRequestMonitor<MIBreakInsertInfo> addBreakpointDRM = DataRequestMonitor<MIBreakInsertInfo> addBreakpointDRM =
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) { new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// With MI, an invalid location won't generate an error // With MI, an invalid location won't generate an error
if (getData().getMIBreakpoints().length == 0) { if (getData().getMIBreakpoints().length == 0) {
@ -555,7 +555,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
DataRequestMonitor<MIBreakInsertInfo> addWatchpointDRM = DataRequestMonitor<MIBreakInsertInfo> addWatchpointDRM =
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) { new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// With MI, an invalid location won't generate an error // With MI, an invalid location won't generate an error
if (getData().getMIBreakpoints().length == 0) { if (getData().getMIBreakpoints().length == 0) {
@ -659,7 +659,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
new DataRequestMonitor<MIInfo>(getExecutor(), rm) { new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
getSession().dispatchEvent(new BreakpointRemovedEvent(dmc), getProperties()); getSession().dispatchEvent(new BreakpointRemovedEvent(dmc), getProperties());
contextBreakpoints.remove(reference); contextBreakpoints.remove(reference);
} }
@ -746,7 +746,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
int numberOfChanges = 0; int numberOfChanges = 0;
final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) { final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
if (generateUpdateEvent) if (generateUpdateEvent)
getSession().dispatchEvent(new BreakpointUpdatedEvent(dmc), getProperties()); getSession().dispatchEvent(new BreakpointUpdatedEvent(dmc), getProperties());
rm.done(); rm.done();
@ -830,7 +830,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
rm.done(); rm.done();
return; return;
} }
if (getStatus().isOK()) { if (isSuccess()) {
breakpoint.setCondition(condition); breakpoint.setCondition(condition);
} }
else { else {
@ -867,7 +867,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
new MIBreakAfter(context, reference, ignoreCount), new MIBreakAfter(context, reference, ignoreCount),
new DataRequestMonitor<MIInfo>(getExecutor(), rm) { new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); MIBreakpointDMData breakpoint = contextBreakpoints.get(reference);
if (breakpoint == null) { if (breakpoint == null) {
rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null));
@ -903,7 +903,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
new MIBreakEnable(context, new int[] { reference }), new MIBreakEnable(context, new int[] { reference }),
new DataRequestMonitor<MIInfo>(getExecutor(), rm) { new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); MIBreakpointDMData breakpoint = contextBreakpoints.get(reference);
if (breakpoint == null) { if (breakpoint == null) {
rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null));
@ -939,7 +939,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
new MIBreakDisable(context, new int[] { reference }), new MIBreakDisable(context, new int[] { reference }),
new DataRequestMonitor<MIInfo>(getExecutor(), rm) { new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
MIBreakpointDMData breakpoint = contextBreakpoints.get(reference); MIBreakpointDMData breakpoint = contextBreakpoints.get(reference);
if (breakpoint == null) { if (breakpoint == null) {
rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null)); rm.setStatus(new Status(IStatus.ERROR, MIPlugin.PLUGIN_ID, REQUEST_FAILED, UNKNOWN_BREAKPOINT, null));

View file

@ -219,7 +219,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
}}); }});
} }
@ -412,7 +412,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// Upon determining the debuggerPath, the breakpoint is installed // Upon determining the debuggerPath, the breakpoint is installed
determineDebuggerPath(dmc, attributes, new RequestMonitor(getExecutor(), countingRm) { determineDebuggerPath(dmc, attributes, new RequestMonitor(getExecutor(), countingRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
installBreakpoint(dmc, breakpoint, attributes, new RequestMonitor(getExecutor(), countingRm)); installBreakpoint(dmc, breakpoint, attributes, new RequestMonitor(getExecutor(), countingRm));
} }
}); });
@ -549,7 +549,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
DataRequestMonitor<IBreakpointDMContext> drm = DataRequestMonitor<IBreakpointDMContext> drm =
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) { new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Add the new back-end breakpoint to the map // Add the new back-end breakpoint to the map
Vector<IBreakpointDMContext> list = breakpointIDs.get(breakpoint); Vector<IBreakpointDMContext> list = breakpointIDs.get(breakpoint);
if (list == null) if (list == null)
@ -684,7 +684,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// Upon completion, update the mappings // Upon completion, update the mappings
CountingRequestMonitor removeRM = new CountingRequestMonitor(getExecutor(), rm) { CountingRequestMonitor removeRM = new CountingRequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Update the mappings // Update the mappings
platformBPs.remove(breakpoint); platformBPs.remove(breakpoint);
threadsIDs.remove(breakpoint); threadsIDs.remove(breakpoint);
@ -804,7 +804,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// Update completion monitor // Update completion monitor
final CountingRequestMonitor updateRM = new CountingRequestMonitor(getExecutor(), rm) { final CountingRequestMonitor updateRM = new CountingRequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Success: simply store the new attributes // Success: simply store the new attributes
platformBPs.put(breakpoint, attributes); platformBPs.put(breakpoint, attributes);
rm.done(); rm.done();
@ -828,7 +828,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
final Vector<IBreakpointDMContext> newTargetBPs = new Vector<IBreakpointDMContext>(); final Vector<IBreakpointDMContext> newTargetBPs = new Vector<IBreakpointDMContext>();
final CountingRequestMonitor removeRM = new CountingRequestMonitor(getExecutor(), rm) { final CountingRequestMonitor removeRM = new CountingRequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// All right! Save the new list and perform the final update // All right! Save the new list and perform the final update
Map<ICBreakpoint, Vector<IBreakpointDMContext>> breakpointIDs = fBreakpointIDs.get(dmc); Map<ICBreakpoint, Vector<IBreakpointDMContext>> breakpointIDs = fBreakpointIDs.get(dmc);
if (breakpointIDs == null) { if (breakpointIDs == null) {
@ -852,7 +852,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// In theory, we could have had a partial success and the original threads // In theory, we could have had a partial success and the original threads
// list would be invalid. We think it is highly unlikely so we assume that // list would be invalid. We think it is highly unlikely so we assume that
// either everything went fine or else everything failed. // either everything went fine or else everything failed.
protected void handleOK() { protected void handleSuccess() {
// Get the list of new back-end breakpoints contexts // Get the list of new back-end breakpoints contexts
newTargetBPs.addAll(getData()); newTargetBPs.addAll(getData());
threadsIDs.put(breakpoint, newThreads); threadsIDs.put(breakpoint, newThreads);
@ -908,7 +908,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// Once we're done, return the new list of back-end breakpoints contexts // Once we're done, return the new list of back-end breakpoints contexts
final CountingRequestMonitor installRM = new CountingRequestMonitor(getExecutor(), drm) { final CountingRequestMonitor installRM = new CountingRequestMonitor(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Report whatever we have managed to install // Report whatever we have managed to install
// It is very likely installation either succeeded or failed for all // It is very likely installation either succeeded or failed for all
drm.setData(breakpointList); drm.setData(breakpointList);
@ -932,7 +932,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
fBreakpoints.insertBreakpoint(context, attrs, fBreakpoints.insertBreakpoint(context, attrs,
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) { new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Add the new back-end breakpoint context to the list // Add the new back-end breakpoint context to the list
breakpointList.add(getData()); breakpointList.add(getData());
try { try {
@ -1011,7 +1011,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
determineDebuggerPath(dmc, attrs, determineDebuggerPath(dmc, attrs,
new RequestMonitor(getExecutor(), countingRm) { new RequestMonitor(getExecutor(), countingRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
installBreakpoint(dmc, (ICBreakpoint) breakpoint, installBreakpoint(dmc, (ICBreakpoint) breakpoint,
attrs, new RequestMonitor(getExecutor(), countingRm)); attrs, new RequestMonitor(getExecutor(), countingRm));
} }
@ -1064,7 +1064,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
if (getStatus().getSeverity() == IStatus.ERROR) { if (getStatus().getSeverity() == IStatus.ERROR) {
MIPlugin.getDefault().getLog().log(getStatus()); MIPlugin.getDefault().getLog().log(getStatus());
} }
@ -1090,7 +1090,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
determineDebuggerPath(dmc, attrs, determineDebuggerPath(dmc, attrs,
new RequestMonitor(getExecutor(), countingRm) { new RequestMonitor(getExecutor(), countingRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
modifyBreakpoint(dmc, (ICBreakpoint) breakpoint, attrs, delta, new RequestMonitor(getExecutor(), countingRm)); modifyBreakpoint(dmc, (ICBreakpoint) breakpoint, attrs, delta, new RequestMonitor(getExecutor(), countingRm));
} }
}); });
@ -1334,7 +1334,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
fSourceLookup.getDebuggerPath(srcDmc, hostPath, fSourceLookup.getDebuggerPath(srcDmc, hostPath,
new DataRequestMonitor<String>(getExecutor(), rm) { new DataRequestMonitor<String>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
attributes.put(ATTR_DEBUGGER_PATH, getData()); attributes.put(ATTR_DEBUGGER_PATH, getData());
rm.done(); rm.done();
} }

View file

@ -54,7 +54,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
public void initialize(final RequestMonitor rm) { public void initialize(final RequestMonitor rm) {
super.initialize(new RequestMonitor(getExecutor(), rm) { super.initialize(new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
} }
}); });
@ -110,7 +110,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
fConnection.queueCommand(new MIDataDisassemble(context, start, end, false), fConnection.queueCommand(new MIDataDisassemble(context, start, end, false),
new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) { new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
IInstruction[] result = getData().getMIAssemblyCode(); IInstruction[] result = getData().getMIAssemblyCode();
drm.setData(result); drm.setData(result);
drm.done(); drm.done();
@ -135,7 +135,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
fConnection.queueCommand(new MIDataDisassemble(context, filename, linenum, lines, false), fConnection.queueCommand(new MIDataDisassemble(context, filename, linenum, lines, false),
new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) { new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
IInstruction[] result = getData().getMIAssemblyCode(); IInstruction[] result = getData().getMIAssemblyCode();
drm.setData(result); drm.setData(result);
drm.done(); drm.done();
@ -163,7 +163,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
fConnection.queueCommand(new MIDataDisassemble(context, start, end, true), fConnection.queueCommand(new MIDataDisassemble(context, start, end, true),
new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) { new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
IMixedInstruction[] result = getData().getMIMixedCode(); IMixedInstruction[] result = getData().getMIMixedCode();
drm.setData(result); drm.setData(result);
drm.done(); drm.done();
@ -189,7 +189,7 @@ public class MIDisassembly extends AbstractDsfService implements IDisassembly {
fConnection.queueCommand(new MIDataDisassemble(context, filename, linenum, lines, true), fConnection.queueCommand(new MIDataDisassemble(context, filename, linenum, lines, true),
new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) { new DataRequestMonitor<MIDataDisassembleInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
IMixedInstruction[] result = getData().getMIMixedCode(); IMixedInstruction[] result = getData().getMIMixedCode();
drm.setData(result); drm.setData(result);
drm.done(); drm.done();

View file

@ -94,7 +94,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
public void initialize(final RequestMonitor requestMonitor) { public void initialize(final RequestMonitor requestMonitor) {
super.initialize(new RequestMonitor(getExecutor(), requestMonitor) { super.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });
@ -304,7 +304,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
expressionService.getExpressionAddressData(context, expressionService.getExpressionAddressData(context,
new DataRequestMonitor<IExpressionDMAddress>(getExecutor(), null) { new DataRequestMonitor<IExpressionDMAddress>(getExecutor(), null) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Figure out which memory area was modified // Figure out which memory area was modified
IExpressionDMAddress expression = getData(); IExpressionDMAddress expression = getData();
final int count = expression.getSize(); final int count = expression.getSize();
@ -694,7 +694,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
final CountingRequestMonitor countingRM = final CountingRequestMonitor countingRM =
new CountingRequestMonitor(getExecutor(), drm) { new CountingRequestMonitor(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// We received everything so read the result from the memory cache // We received everything so read the result from the memory cache
drm.setData(getMemoryBlockFromCache(address, count)); drm.setData(getMemoryBlockFromCache(address, count));
drm.done(); drm.done();
@ -710,7 +710,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
readMemoryBlock(memoryDMC, startAddress, 0, word_size, length, readMemoryBlock(memoryDMC, startAddress, 0, word_size, length,
new DataRequestMonitor<MemoryByte[]>(getSession().getExecutor(), drm) { new DataRequestMonitor<MemoryByte[]>(getSession().getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
MemoryByte[] block = new MemoryByte[count]; MemoryByte[] block = new MemoryByte[count];
block = getData(); block = getData();
MemoryBlock memoryBlock = new MemoryBlock(startAddress, length, block); MemoryBlock memoryBlock = new MemoryBlock(startAddress, length, block);
@ -738,7 +738,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
memoryDMC, address, offset, word_size, count, buffer, memoryDMC, address, offset, word_size, count, buffer,
new RequestMonitor(getSession().getExecutor(), rm) { new RequestMonitor(getSession().getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Clear the command cache (otherwise we can't guarantee // Clear the command cache (otherwise we can't guarantee
// that the subsequent memory read will be correct) // that the subsequent memory read will be correct)
fCommandCache.reset(); fCommandCache.reset();
@ -747,7 +747,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
final DataRequestMonitor<MemoryByte[]> drm = final DataRequestMonitor<MemoryByte[]> drm =
new DataRequestMonitor<MemoryByte[]>(getExecutor(), rm) { new DataRequestMonitor<MemoryByte[]>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
updateMemoryCache(address.add(offset), count, getData()); updateMemoryCache(address.add(offset), count, getData());
// Send the MemoryChangedEvent // Send the MemoryChangedEvent
IAddress[] addresses = new IAddress[count]; IAddress[] addresses = new IAddress[count];
@ -764,7 +764,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
readMemoryBlock(memoryDMC, address, offset, word_size, count, readMemoryBlock(memoryDMC, address, offset, word_size, count,
new DataRequestMonitor<MemoryByte[]>(getExecutor(), drm) { new DataRequestMonitor<MemoryByte[]>(getExecutor(), drm) {
@Override @Override
public void handleOK() { protected void handleSuccess() {
drm.setData(getData()); drm.setData(getData());
drm.done(); drm.done();
} }
@ -809,7 +809,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
fMemoryCache.readMemoryBlock(memoryDMC, address, 0, 1, count, fMemoryCache.readMemoryBlock(memoryDMC, address, 0, 1, count,
new DataRequestMonitor<MemoryByte[]>(getExecutor(), rm) { new DataRequestMonitor<MemoryByte[]>(getExecutor(), rm) {
@Override @Override
public void handleOK() { protected void handleSuccess() {
MemoryByte[] oldBlock = fMemoryCache.getMemoryBlockFromCache(address, count); MemoryByte[] oldBlock = fMemoryCache.getMemoryBlockFromCache(address, count);
MemoryByte[] newBlock = getData(); MemoryByte[] newBlock = getData();
boolean blocksDiffer = false; boolean blocksDiffer = false;
@ -855,7 +855,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
new MIDataReadMemory(memoryDMC, offset, address.toString(), mode, word_size, nb_rows, nb_cols, asChar), new MIDataReadMemory(memoryDMC, offset, address.toString(), mode, word_size, nb_rows, nb_cols, asChar),
new DataRequestMonitor<MIDataReadMemoryInfo>(getExecutor(), drm) { new DataRequestMonitor<MIDataReadMemoryInfo>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Retrieve the memory block // Retrieve the memory block
drm.setData(getData().getMIMemoryBlock()); drm.setData(getData().getMIMemoryBlock());
drm.done(); drm.done();
@ -881,7 +881,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
final CountingRequestMonitor countingRM = final CountingRequestMonitor countingRM =
new CountingRequestMonitor(getExecutor(), rm) { new CountingRequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.done(); rm.done();
} }
}; };

View file

@ -53,7 +53,7 @@ public class MIModules extends AbstractDsfService implements IModules {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
}}); }});
} }
@ -155,7 +155,7 @@ public class MIModules extends AbstractDsfService implements IModules {
fModulesCache.execute(new CLIInfoSharedLibrary(symCtx), fModulesCache.execute(new CLIInfoSharedLibrary(symCtx),
new DataRequestMonitor<CLIInfoSharedLibraryInfo>(getExecutor(), rm) { new DataRequestMonitor<CLIInfoSharedLibraryInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(makeModuleContexts(symCtx, getData())); rm.setData(makeModuleContexts(symCtx, getData()));
rm.done(); rm.done();
} }
@ -184,7 +184,7 @@ public class MIModules extends AbstractDsfService implements IModules {
fModulesCache.execute(new CLIInfoSharedLibrary(dmc), fModulesCache.execute(new CLIInfoSharedLibrary(dmc),
new DataRequestMonitor<CLIInfoSharedLibraryInfo>(getExecutor(), rm) { new DataRequestMonitor<CLIInfoSharedLibraryInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData( createSharedLibInfo((ModuleDMContext)dmc, getData()) ); rm.setData( createSharedLibInfo((ModuleDMContext)dmc, getData()) );
rm.done(); rm.done();
} }

View file

@ -162,7 +162,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
}}); }});
} }
@ -269,7 +269,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters {
new MIDataListRegisterValues(execDmc, MIFormat.HEXADECIMAL, regnos), new MIDataListRegisterValues(execDmc, MIFormat.HEXADECIMAL, regnos),
new DataRequestMonitor<MIDataListRegisterValuesInfo>(getExecutor(), rm) { new DataRequestMonitor<MIDataListRegisterValuesInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Retrieve the register value. // Retrieve the register value.
MIRegisterValue[] regValue = getData().getMIRegisterValues(); MIRegisterValue[] regValue = getData().getMIRegisterValues();
@ -324,7 +324,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters {
new MIDataListRegisterValues(miExecDmc, NumberFormat, regnos), new MIDataListRegisterValues(miExecDmc, NumberFormat, regnos),
new DataRequestMonitor<MIDataListRegisterValuesInfo>(getExecutor(), rm) { new DataRequestMonitor<MIDataListRegisterValuesInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Retrieve the register value. // Retrieve the register value.
MIRegisterValue[] regValue = getData().getMIRegisterValues(); MIRegisterValue[] regValue = getData().getMIRegisterValues();
@ -463,7 +463,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters {
new MIDataListRegisterNames(containerDmc), new MIDataListRegisterNames(containerDmc),
new DataRequestMonitor<MIDataListRegisterNamesInfo>(getExecutor(), rm) { new DataRequestMonitor<MIDataListRegisterNamesInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Retrieve the register names. // Retrieve the register names.
String[] regNames = getData().getRegisterNames() ; String[] regNames = getData().getRegisterNames() ;
@ -515,18 +515,18 @@ public class MIRegisters extends AbstractDsfService implements IRegisters {
final IExpressionDMContext exprCtxt = exprService.createExpression(regCtx, "$" + regName); //$NON-NLS-1$ final IExpressionDMContext exprCtxt = exprService.createExpression(regCtx, "$" + regName); //$NON-NLS-1$
exprService.getModelData(exprCtxt, new DataRequestMonitor<IExpressionDMData>(getExecutor(), rm) { exprService.getModelData(exprCtxt, new DataRequestMonitor<IExpressionDMData>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Evaluate the expression - request HEX since it works in every case // Evaluate the expression - request HEX since it works in every case
final FormattedValueDMContext valueDmc = exprService.getFormattedValueContext(exprCtxt, formatId); final FormattedValueDMContext valueDmc = exprService.getFormattedValueContext(exprCtxt, formatId);
exprService.getModelData( exprService.getModelData(
valueDmc, valueDmc,
new DataRequestMonitor<FormattedValueDMData>(getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(getExecutor(), null) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
if(! regValue.equals(getData().getFormattedValue()) || ! valueDmc.getFormatID().equals(formatId)){ if(! regValue.equals(getData().getFormattedValue()) || ! valueDmc.getFormatID().equals(formatId)){
exprService.writeExpression(exprCtxt, regValue, formatId, new DataRequestMonitor<MIInfo>(getExecutor(), rm) { exprService.writeExpression(exprCtxt, regValue, formatId, new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
generateRegisterChangedEvent(regDmc); generateRegisterChangedEvent(regDmc);
} }
}); });

View file

@ -291,7 +291,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
}}); }});
} }
@ -484,7 +484,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl
cmd, cmd,
new DataRequestMonitor<MIInfo>(getExecutor(), rm) { new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.done(); rm.done();
} }
} }
@ -516,7 +516,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl
cmd, cmd,
new DataRequestMonitor<MIInfo>(getExecutor(), rm) { new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.done(); rm.done();
} }
} }
@ -598,7 +598,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl
new DataRequestMonitor<MIThreadListIdsInfo>( new DataRequestMonitor<MIThreadListIdsInfo>(
getExecutor(), rm) { getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(makeExecutionDMCs(containerDmc, getData())); rm.setData(makeExecutionDMCs(containerDmc, getData()));
rm.done(); rm.done();
} }
@ -654,7 +654,7 @@ public class MIRunControl extends AbstractDsfService implements IRunControl
new DataRequestMonitor<MIInfo>( new DataRequestMonitor<MIInfo>(
getExecutor(), rm) { getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.done(); rm.done();
} }
}); });

View file

@ -135,7 +135,7 @@ public class MIStack extends AbstractDsfService
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
doInitialize(rm); doInitialize(rm);
} }
}); });
@ -205,7 +205,7 @@ public class MIStack extends AbstractDsfService
new MIStackListFrames(execDmc), new MIStackListFrames(execDmc),
new DataRequestMonitor<MIStackListFramesInfo>(getExecutor(), rm) { new DataRequestMonitor<MIStackListFramesInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(getFrames(execDmc, getData())); rm.setData(getFrames(execDmc, getData()));
rm.done(); rm.done();
} }
@ -236,7 +236,7 @@ public class MIStack extends AbstractDsfService
ctx, ctx,
new DataRequestMonitor<IFrameDMContext[]>(getExecutor(), rm) { new DataRequestMonitor<IFrameDMContext[]>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(getData()[0]); rm.setData(getData()[0]);
rm.done(); rm.done();
} }
@ -340,7 +340,7 @@ public class MIStack extends AbstractDsfService
new MIStackListFrames(execDmc), new MIStackListFrames(execDmc),
new DataRequestMonitor<MIStackListFramesInfo>(getExecutor(), rm) { new DataRequestMonitor<MIStackListFramesInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Find the index to the correct MI frame object. // Find the index to the correct MI frame object.
int idx = findFrameIndex(getData().getMIFrames(), miFrameDmc.fLevel); int idx = findFrameIndex(getData().getMIFrames(), miFrameDmc.fLevel);
if (idx == -1) { if (idx == -1) {
@ -384,7 +384,7 @@ public class MIStack extends AbstractDsfService
new MIStackListArguments(execDmc, true), new MIStackListArguments(execDmc, true),
new DataRequestMonitor<MIStackListArgumentsInfo>(getExecutor(), rm) { new DataRequestMonitor<MIStackListArgumentsInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Find the index to the correct MI frame object. // Find the index to the correct MI frame object.
// Note: this is a short-cut, but it won't work once we implement retrieving // Note: this is a short-cut, but it won't work once we implement retrieving
// partial lists of stack frames. // partial lists of stack frames.
@ -464,7 +464,7 @@ public class MIStack extends AbstractDsfService
new MIStackListArguments(execDmc, true), new MIStackListArguments(execDmc, true),
new DataRequestMonitor<MIStackListArgumentsInfo>(getExecutor(), rm) { new DataRequestMonitor<MIStackListArgumentsInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Find the correct frame and argument // Find the correct frame and argument
if ( frameDmc.fLevel >= getData().getMIFrames().length || if ( frameDmc.fLevel >= getData().getMIFrames().length ||
miVariableDmc.fIndex >= getData().getMIFrames()[frameDmc.fLevel].getArgs().length ) miVariableDmc.fIndex >= getData().getMIFrames()[frameDmc.fLevel].getArgs().length )
@ -484,7 +484,7 @@ public class MIStack extends AbstractDsfService
new MIStackListLocals(frameDmc, true), new MIStackListLocals(frameDmc, true),
new DataRequestMonitor<MIStackListLocalsInfo>(getExecutor(), rm) { new DataRequestMonitor<MIStackListLocalsInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Create the data object. // Create the data object.
rm.setData(new VariableData(getData().getLocals()[miVariableDmc.fIndex])); rm.setData(new VariableData(getData().getLocals()[miVariableDmc.fIndex]));
@ -520,7 +520,7 @@ public class MIStack extends AbstractDsfService
final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) { final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData( localsList.toArray(new IVariableDMContext[localsList.size()]) ); rm.setData( localsList.toArray(new IVariableDMContext[localsList.size()]) );
rm.done(); rm.done();
} }
@ -531,7 +531,7 @@ public class MIStack extends AbstractDsfService
frameDmc, frameDmc,
new DataRequestMonitor<IVariableDMContext[]>(getExecutor(), countingRm) { new DataRequestMonitor<IVariableDMContext[]>(getExecutor(), countingRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
localsList.addAll( Arrays.asList(getData()) ); localsList.addAll( Arrays.asList(getData()) );
countingRm.done(); countingRm.done();
} }
@ -541,7 +541,7 @@ public class MIStack extends AbstractDsfService
new MIStackListLocals(frameDmc, true), new MIStackListLocals(frameDmc, true),
new DataRequestMonitor<MIStackListLocalsInfo>(getExecutor(), rm) { new DataRequestMonitor<MIStackListLocalsInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
localsList.addAll( Arrays.asList( localsList.addAll( Arrays.asList(
makeVariableDMCs(frameDmc, MIVariableDMC.Type.LOCAL, getData().getLocals().length)) ); makeVariableDMCs(frameDmc, MIVariableDMC.Type.LOCAL, getData().getLocals().length)) );
countingRm.done(); countingRm.done();
@ -560,7 +560,7 @@ public class MIStack extends AbstractDsfService
depthCommand, depthCommand,
new DataRequestMonitor<MIStackInfoDepthInfo>(getExecutor(), rm) { new DataRequestMonitor<MIStackInfoDepthInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(getData().getDepth()); rm.setData(getData().getDepth());
rm.done(); rm.done();
} }

View file

@ -358,7 +358,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
protected void handleCompleted() { protected void handleCompleted() {
currentState = STATE_READY; currentState = STATE_READY;
if (getStatus().isOK()) { if (isSuccess()) {
outOfScope = getRootToUpdate().isOutOfScope(); outOfScope = getRootToUpdate().isOutOfScope();
// This request monitor is the one that should re-create // This request monitor is the one that should re-create
// the variable object if the old one was out-of-scope // the variable object if the old one was out-of-scope
@ -414,7 +414,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new MIVarShowAttributes(fControlDmc, getGdbName()), new MIVarShowAttributes(fControlDmc, getGdbName()),
new DataRequestMonitor<MIVarShowAttributesInfo>(getExecutor(), rm) { new DataRequestMonitor<MIVarShowAttributesInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
editable = getData().isEditable(); editable = getData().isEditable();
rm.setData(editable); rm.setData(editable);
@ -466,7 +466,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
addrCxt, addrCxt,
new DataRequestMonitor<MIVariableObject>(getExecutor(), rm) { new DataRequestMonitor<MIVariableObject>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getData().getValue(formatCxt, rm); getData().getValue(formatCxt, rm);
} }
@ -485,7 +485,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
if (locked) { if (locked) {
operationsPending.add(new RequestMonitor(getExecutor(), rm) { operationsPending.add(new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getValue(dmc, rm); getValue(dmc, rm);
} }
}); });
@ -503,7 +503,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new DataRequestMonitor<MIVarSetFormatInfo>(getExecutor(), rm) { new DataRequestMonitor<MIVarSetFormatInfo>(getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
setCurrentFormat(dmc.getFormatID()); setCurrentFormat(dmc.getFormatID());
// If set-format returned the value, no need to evaluate // If set-format returned the value, no need to evaluate
@ -539,7 +539,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new DataRequestMonitor<MIVarEvaluateExpressionInfo>(getExecutor(), rm) { new DataRequestMonitor<MIVarEvaluateExpressionInfo>(getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
setValue(getCurrentFormat(), getData().getValue()); setValue(getCurrentFormat(), getData().getValue());
rm.setData(new FormattedValueDMData(getData().getValue())); rm.setData(new FormattedValueDMData(getData().getValue()));
rm.done(); rm.done();
@ -576,7 +576,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new DataRequestMonitor<MIVarSetFormatInfo>(getExecutor(), null) { new DataRequestMonitor<MIVarSetFormatInfo>(getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
setCurrentFormat(IFormattedValues.NATURAL_FORMAT); setCurrentFormat(IFormattedValues.NATURAL_FORMAT);
} }
unlock(); unlock();
@ -641,13 +641,13 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new MIVarListChildren(fControlDmc, getGdbName()), new MIVarListChildren(fControlDmc, getGdbName()),
new DataRequestMonitor<MIVarListChildrenInfo>(getExecutor(), rm) { new DataRequestMonitor<MIVarListChildrenInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
MIVar[] children = getData().getMIVars(); MIVar[] children = getData().getMIVars();
final List<ExpressionInfo> realChildren = new ArrayList<ExpressionInfo>(); final List<ExpressionInfo> realChildren = new ArrayList<ExpressionInfo>();
final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) { final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Store the children in our variable object cache // Store the children in our variable object cache
setChildren(realChildren.toArray(new ExpressionInfo[realChildren.size()])); setChildren(realChildren.toArray(new ExpressionInfo[realChildren.size()]));
rm.setData(getChildren()); rm.setData(getChildren());
@ -678,7 +678,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
final DataRequestMonitor<String> childPathRm = final DataRequestMonitor<String> childPathRm =
new DataRequestMonitor<String>(getExecutor(), countingRm) { new DataRequestMonitor<String>(getExecutor(), countingRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
String childFullExpression = getData(); String childFullExpression = getData();
// For children that do not map to a real expression (such as f.public) // For children that do not map to a real expression (such as f.public)
@ -729,7 +729,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
exprDmc, exprDmc,
new DataRequestMonitor<ExpressionInfo[]>(getExecutor(), countingRm) { new DataRequestMonitor<ExpressionInfo[]>(getExecutor(), countingRm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
ExpressionInfo[] vars = getData(); ExpressionInfo[] vars = getData();
for (ExpressionInfo realChild : vars) { for (ExpressionInfo realChild : vars) {
realChildren.add(realChild); realChildren.add(realChild);
@ -759,7 +759,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new DataRequestMonitor<MIVarInfoPathExpressionInfo>(getExecutor(), childPathRm) { new DataRequestMonitor<MIVarInfoPathExpressionInfo>(getExecutor(), childPathRm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
childPathRm.setData(getData().getFullExpression()); childPathRm.setData(getData().getFullExpression());
} else { } else {
// If we don't have var-info-path-expression // If we don't have var-info-path-expression
@ -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 // Return a status info so that handleOK is not called and we don't send
// an ExpressionChanged event // an ExpressionChanged event
if (value.equals(getValue(formatId))) { if (value.equals(getValue(formatId))) {
rm.setStatus(new Status(IStatus.INFO, MIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, rm.setStatus(new Status(IStatus.WARNING, MIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED,
"Setting to the same value of: " + value, null)); //$NON-NLS-1$ "Setting to the same value of: " + value, null)); //$NON-NLS-1$
rm.done(); rm.done();
return; return;
@ -885,7 +885,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new MIVarAssign(fControlDmc, getGdbName(), value), new MIVarAssign(fControlDmc, getGdbName(), value),
new DataRequestMonitor<MIVarAssignInfo>(getExecutor(), rm) { new DataRequestMonitor<MIVarAssignInfo>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// We must also mark all variable objects // We must also mark all variable objects
// as out-of-date. This is because some variable objects may be affected // as out-of-date. This is because some variable objects may be affected
// by this one having changed. // by this one having changed.
@ -963,7 +963,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
new DataRequestMonitor<MIVarCreateInfo>(getExecutor(), rm) { new DataRequestMonitor<MIVarCreateInfo>(getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
setGdbName(getData().getName()); setGdbName(getData().getName());
setExpressionData( setExpressionData(
exprCtx.getExpression(), exprCtx.getExpression(),
@ -1062,7 +1062,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
protected void handleCompleted() { protected void handleCompleted() {
currentState = STATE_READY; currentState = STATE_READY;
if (getStatus().isOK()) { if (isSuccess()) {
outOfDate = false; outOfDate = false;
MIVarChange[] changes = getData().getMIVarChanges(); MIVarChange[] changes = getData().getMIVarChanges();
@ -1201,7 +1201,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
execCtx, 0, execCtx, 0,
new DataRequestMonitor<Integer>(getExecutor(), rm) { new DataRequestMonitor<Integer>(getExecutor(), rm) {
@Override @Override
public void handleOK() { protected void handleSuccess() {
fFrameId = new Integer(getData() - frameCtx.getLevel()); fFrameId = new Integer(getData() - frameCtx.getLevel());
rm.done(); rm.done();
} }
@ -1362,7 +1362,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
exprCtx, exprCtx,
new RequestMonitor(getExecutor(), rm) { new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getVariable(id, exprCtx, rm); getVariable(id, exprCtx, rm);
} }
}); });
@ -1383,7 +1383,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
// and if we should re-create it. // and if we should re-create it.
varObj.update(new DataRequestMonitor<Boolean>(getExecutor(), rm) { varObj.update(new DataRequestMonitor<Boolean>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
boolean shouldCreateNew = getData().booleanValue(); boolean shouldCreateNew = getData().booleanValue();
@ -1444,7 +1444,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
newVarObj.create(exprCtx, new RequestMonitor(getExecutor(), rm) { newVarObj.create(exprCtx, new RequestMonitor(getExecutor(), rm) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
// Also store the object as a varObj that is up-to-date // Also store the object as a varObj that is up-to-date
updatedRootList.add(newVarObj); updatedRootList.add(newVarObj);
@ -1481,7 +1481,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
ctx, ctx,
new DataRequestMonitor<MIVariableObject>(getExecutor(), rm) { new DataRequestMonitor<MIVariableObject>(getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getData().writeValue(expressionValue, formatId, rm); getData().writeValue(expressionValue, formatId, rm);
} }
}); });
@ -1504,7 +1504,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
exprCtx, exprCtx,
new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) { new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
drm.setData( drm.setData(
new ExprMetaGetVarInfo( new ExprMetaGetVarInfo(
exprCtx.getRelativeExpression(), exprCtx.getRelativeExpression(),
@ -1523,11 +1523,11 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
exprCtx, exprCtx,
new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) { new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getData().getAttributes( getData().getAttributes(
new DataRequestMonitor<Boolean>(getExecutor(), drm) { new DataRequestMonitor<Boolean>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
drm.setData(new ExprMetaGetAttributesInfo(getData())); drm.setData(new ExprMetaGetAttributesInfo(getData()));
drm.done(); drm.done();
} }
@ -1546,12 +1546,12 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
exprCtx, exprCtx,
new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) { new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getData().getValue( getData().getValue(
valueCtx, valueCtx,
new DataRequestMonitor<FormattedValueDMData>(getExecutor(), drm) { new DataRequestMonitor<FormattedValueDMData>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
drm.setData( drm.setData(
new ExprMetaGetValueInfo(getData().getFormattedValue())); new ExprMetaGetValueInfo(getData().getFormattedValue()));
drm.done(); drm.done();
@ -1569,12 +1569,12 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
exprCtx, exprCtx,
new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) { new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getData().getChildren( getData().getChildren(
exprCtx, exprCtx,
new DataRequestMonitor<ExpressionInfo[]>(getExecutor(), drm) { new DataRequestMonitor<ExpressionInfo[]>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
drm.setData(new ExprMetaGetChildrenInfo(getData())); drm.setData(new ExprMetaGetChildrenInfo(getData()));
drm.done(); drm.done();
} }
@ -1591,11 +1591,11 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
exprCtx, exprCtx,
new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) { new DataRequestMonitor<MIVariableObject>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
getData().getChildrenCount( getData().getChildrenCount(
new DataRequestMonitor<Integer>(getExecutor(), drm) { new DataRequestMonitor<Integer>(getExecutor(), drm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
drm.setData(new ExprMetaGetChildCountInfo(getData())); drm.setData(new ExprMetaGetChildCountInfo(getData()));
drm.done(); drm.done();
} }

View file

@ -56,7 +56,7 @@ public class MILogActionEnabler implements ILogActionEnabler {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
String result = expression + ": evaluation failed."; //$NON-NLS-1$ String result = expression + ": evaluation failed."; //$NON-NLS-1$
if (getStatus().isOK()) { if (isSuccess()) {
result = getData().getFormattedValue(); result = getData().getFormattedValue();
} }
drm.setData(result); drm.setData(result);

View file

@ -238,7 +238,7 @@ public class MIInferiorProcess extends Process
new MIGDBShowExitCode(getCommandControl().getControlDMContext()), new MIGDBShowExitCode(getCommandControl().getControlDMContext()),
new DataRequestMonitor<MIGDBShowExitCodeInfo>(fSession.getExecutor(), rm) { new DataRequestMonitor<MIGDBShowExitCodeInfo>(fSession.getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
rm.setData(getData().getCode()); rm.setData(getData().getCode());
rm.done(); rm.done();
} }

View file

@ -37,7 +37,7 @@ abstract public class AbstractService extends AbstractDsfService
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
public void handleOK() { public void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });

View file

@ -24,7 +24,7 @@ public class Service1 extends AbstractService {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
public void handleOK() { public void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });

View file

@ -24,7 +24,7 @@ public class Service2 extends AbstractService {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
public void handleOK() { public void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });

View file

@ -30,7 +30,7 @@ public class Service3 extends AbstractService {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
public void handleOK() { public void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });

View file

@ -38,7 +38,7 @@ public class MultiInstanceTestService extends AbstractDsfService {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
public void handleOK() { public void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });

View file

@ -34,7 +34,7 @@ public class SimpleTestService extends AbstractDsfService {
super.initialize( super.initialize(
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
public void handleOK() { public void handleSuccess() {
doInitialize(requestMonitor); doInitialize(requestMonitor);
} }
}); });

View file

@ -354,7 +354,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
@ -455,7 +455,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("28")) { if (getData().getFormattedValue().equals("28")) {
@ -474,7 +474,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equalsIgnoreCase("0x1c")) { if (getData().getFormattedValue().equalsIgnoreCase("0x1c")) {
@ -523,7 +523,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
@ -551,7 +551,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals(actualAddrStr)) { if (getData().getFormattedValue().equals(actualAddrStr)) {
@ -569,7 +569,7 @@ public class ExpressionServiceTest extends BaseTestCase {
fExpService.getExecutor(), null) { fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
IExpressionDMContext[] children = getData(); IExpressionDMContext[] children = getData();
@ -597,7 +597,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals(actualAddrStr)) { if (getData().getFormattedValue().equals(actualAddrStr)) {
@ -645,7 +645,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
@ -672,7 +672,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals(actualAddrStr)) { if (getData().getFormattedValue().equals(actualAddrStr)) {
@ -690,7 +690,7 @@ public class ExpressionServiceTest extends BaseTestCase {
null) { null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
int count = getData(); int count = getData();
@ -711,7 +711,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals(actualAddrStr)) { if (getData().getFormattedValue().equals(actualAddrStr)) {
@ -761,7 +761,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("32")) { if (getData().getFormattedValue().equals("32")) {
@ -780,7 +780,7 @@ public class ExpressionServiceTest extends BaseTestCase {
fExpService.getExecutor(), null) { fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
wait.waitFinished(); wait.waitFinished();
@ -795,7 +795,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("0x38")) { if (getData().getFormattedValue().equals("0x38")) {
@ -850,7 +850,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("32")) { if (getData().getFormattedValue().equals("32")) {
@ -870,7 +870,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("0x20")) { if (getData().getFormattedValue().equals("0x20")) {
@ -889,7 +889,7 @@ public class ExpressionServiceTest extends BaseTestCase {
null) { null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData() != 0) { if (getData() != 0) {
@ -907,7 +907,7 @@ public class ExpressionServiceTest extends BaseTestCase {
fExpService.getExecutor(), null) { fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().length != 0) { if (getData().length != 0) {
@ -927,7 +927,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("040")) { if (getData().getFormattedValue().equals("040")) {
@ -986,7 +986,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("32")) { if (getData().getFormattedValue().equals("32")) {
@ -1005,7 +1005,7 @@ public class ExpressionServiceTest extends BaseTestCase {
fExpService.getExecutor(), null) { fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
wait.waitFinished(); wait.waitFinished();
@ -1022,7 +1022,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("070")) { if (getData().getFormattedValue().equals("070")) {
@ -1048,7 +1048,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("32")) { if (getData().getFormattedValue().equals("32")) {
@ -1080,7 +1080,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("56")) { if (getData().getFormattedValue().equals("56")) {
@ -1131,7 +1131,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
@ -1282,7 +1282,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 2) { } else if (getData().length != 2) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1296,7 +1296,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -1334,7 +1334,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 2) { } else if (getData().length != 2) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1348,7 +1348,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -1386,7 +1386,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 2) { } else if (getData().length != 2) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1400,7 +1400,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -1466,7 +1466,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 1) { } else if (getData().length != 1) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1480,7 +1480,7 @@ public class ExpressionServiceTest extends BaseTestCase {
protected void handleCompleted() { protected void handleCompleted() {
final IExpressionDMContext[] childDmcs = getData(); final IExpressionDMContext[] childDmcs = getData();
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (childDmcs.length != 2) { } else if (childDmcs.length != 2) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1497,7 +1497,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -1542,7 +1542,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 1) { } else if (getData().length != 1) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1556,7 +1556,7 @@ public class ExpressionServiceTest extends BaseTestCase {
protected void handleCompleted() { protected void handleCompleted() {
final IExpressionDMContext[] childDmcs = getData(); final IExpressionDMContext[] childDmcs = getData();
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (childDmcs.length != 2) { } else if (childDmcs.length != 2) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1573,7 +1573,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -1627,7 +1627,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().length != 5) { if (getData().length != 5) {
@ -1645,7 +1645,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().length != 2) { if (getData().length != 2) {
@ -1692,7 +1692,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
wait.waitFinished(); wait.waitFinished();
@ -1717,7 +1717,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
wait.waitFinished(); wait.waitFinished();
@ -1765,7 +1765,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("1011")) { if (getData().getFormattedValue().equals("1011")) {
@ -1801,7 +1801,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("11")) { if (getData().getFormattedValue().equals("11")) {
@ -1864,7 +1864,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("1.99")) { if (getData().getFormattedValue().equals("1.99")) {
@ -1885,7 +1885,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("0x1")) { if (getData().getFormattedValue().equals("0x1")) {
@ -1922,7 +1922,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("1.22")) { if (getData().getFormattedValue().equals("1.22")) {
@ -1981,7 +1981,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 1) { } else if (getData().length != 1) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -1998,7 +1998,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2017,7 +2017,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals(valueStr)) { if (getData().getFormattedValue().equals(valueStr)) {
@ -2055,7 +2055,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
if (getData().getFormattedValue().equals("1.22")) { if (getData().getFormattedValue().equals("1.22")) {
@ -2101,7 +2101,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 1) { } else if (getData().length != 1) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -2115,7 +2115,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2148,7 +2148,7 @@ public class ExpressionServiceTest extends BaseTestCase {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
final String valueStr = "1"; final String valueStr = "1";
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2167,7 +2167,7 @@ public class ExpressionServiceTest extends BaseTestCase {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
final String valueStr = "0x1"; final String valueStr = "0x1";
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2216,7 +2216,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 1) { } else if (getData().length != 1) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -2230,7 +2230,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2265,7 +2265,7 @@ public class ExpressionServiceTest extends BaseTestCase {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
final String valueStr = "2"; final String valueStr = "2";
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2292,7 +2292,7 @@ public class ExpressionServiceTest extends BaseTestCase {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
final String valueStr = "{...}"; final String valueStr = "{...}";
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2312,7 +2312,7 @@ public class ExpressionServiceTest extends BaseTestCase {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
final String valueStr = "{...}"; final String valueStr = "{...}";
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(valueStr)) { } else if (getData().getFormattedValue().equals(valueStr)) {
wait.waitFinished(); wait.waitFinished();
@ -2361,7 +2361,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 2) { } else if (getData().length != 2) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -2378,7 +2378,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(firstValue)) { } else if (getData().getFormattedValue().equals(firstValue)) {
wait.waitFinished(); wait.waitFinished();
@ -2397,7 +2397,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
wait.setReturnInfo(getData().getFormattedValue()); wait.setReturnInfo(getData().getFormattedValue());
@ -2425,7 +2425,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 1) { } else if (getData().length != 1) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -2438,7 +2438,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(firstValue)) { } else if (getData().getFormattedValue().equals(firstValue)) {
wait.waitFinished(); wait.waitFinished();
@ -2473,7 +2473,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 2) { } else if (getData().length != 2) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -2490,7 +2490,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(secondValue)) { } else if (getData().getFormattedValue().equals(secondValue)) {
wait.waitFinished(); wait.waitFinished();
@ -2509,7 +2509,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (!getData().getFormattedValue().equals(pointerValue)) { } else if (!getData().getFormattedValue().equals(pointerValue)) {
// The value should have changed // The value should have changed
@ -2540,7 +2540,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().length != 1) { } else if (getData().length != 1) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
@ -2553,7 +2553,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData().getFormattedValue().equals(thirdValue)) { } else if (getData().getFormattedValue().equals(thirdValue)) {
wait.waitFinished(); wait.waitFinished();
@ -2617,7 +2617,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<Boolean>(fExpService.getExecutor(), null) { new DataRequestMonitor<Boolean>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData() == expectedValues[finalIndex]) { } else if (getData() == expectedValues[finalIndex]) {
wait.waitFinished(); wait.waitFinished();
@ -2674,7 +2674,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<Boolean>(fExpService.getExecutor(), null) { new DataRequestMonitor<Boolean>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else if (getData() == expectedValues[finalIndex]) { } else if (getData() == expectedValues[finalIndex]) {
wait.waitFinished(); wait.waitFinished();
@ -2729,7 +2729,7 @@ public class ExpressionServiceTest extends BaseTestCase {
fExpService.getExecutor(), null) { fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
final String[] formatIds = getData(); final String[] formatIds = getData();
@ -2756,7 +2756,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (!getStatus().isOK()) { if (!isSuccess()) {
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
} else { } else {
@ -2831,7 +2831,7 @@ public class ExpressionServiceTest extends BaseTestCase {
.getExecutor(), null) { .getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
@ -2923,7 +2923,7 @@ public class ExpressionServiceTest extends BaseTestCase {
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) { new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());

View file

@ -95,7 +95,7 @@ public class GDBProcessesTest extends BaseTestCase {
new DataRequestMonitor<GDBProcessData>(fSession.getExecutor(), null) { new DataRequestMonitor<GDBProcessData>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -144,7 +144,7 @@ public class GDBProcessesTest extends BaseTestCase {
new DataRequestMonitor<GDBThreadData>(fSession.getExecutor(), null) { new DataRequestMonitor<GDBThreadData>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());

View file

@ -346,7 +346,7 @@ public class MIBreakpointsTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fSession.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());

View file

@ -145,7 +145,7 @@ public class MIDisassemblyTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fSession.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -196,7 +196,7 @@ public class MIDisassemblyTest extends BaseTestCase {
new DataRequestMonitor<IInstruction[]>(fSession.getExecutor(), null) { new DataRequestMonitor<IInstruction[]>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -237,7 +237,7 @@ public class MIDisassemblyTest extends BaseTestCase {
new DataRequestMonitor<IInstruction[]>(fSession.getExecutor(), null) { new DataRequestMonitor<IInstruction[]>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -277,7 +277,7 @@ public class MIDisassemblyTest extends BaseTestCase {
new DataRequestMonitor<IMixedInstruction[]>(fSession.getExecutor(), null) { new DataRequestMonitor<IMixedInstruction[]>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -318,7 +318,7 @@ public class MIDisassemblyTest extends BaseTestCase {
new DataRequestMonitor<IMixedInstruction[]>(fSession.getExecutor(), null) { new DataRequestMonitor<IMixedInstruction[]>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());

View file

@ -213,7 +213,7 @@ public class MIMemoryTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fSession.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -265,7 +265,7 @@ public class MIMemoryTest extends BaseTestCase {
new DataRequestMonitor<MemoryByte[]>(fSession.getExecutor(), null) { new DataRequestMonitor<MemoryByte[]>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -307,7 +307,7 @@ public class MIMemoryTest extends BaseTestCase {
new DataRequestMonitor<MemoryByte[]>(fSession.getExecutor(), null) { new DataRequestMonitor<MemoryByte[]>(fSession.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
result[(int) offset] = getData()[0]; result[(int) offset] = getData()[0];
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());

View file

@ -111,7 +111,7 @@ public class MIRegistersTest extends BaseTestCase {
new DataRequestMonitor<IRegisterGroupDMContext[]>(fRegService.getExecutor(), null) { new DataRequestMonitor<IRegisterGroupDMContext[]>(fRegService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
@ -148,7 +148,7 @@ public class MIRegistersTest extends BaseTestCase {
new DataRequestMonitor<IRegisterDMContext[]>(fRegService.getExecutor(), null) { new DataRequestMonitor<IRegisterDMContext[]>(fRegService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
@ -228,7 +228,7 @@ public class MIRegistersTest extends BaseTestCase {
new DataRequestMonitor<FormattedValueDMData>(fRegService.getExecutor(), null) { new DataRequestMonitor<FormattedValueDMData>(fRegService.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }

View file

@ -125,7 +125,7 @@ public class MIRunControlTest extends BaseTestCase {
new DataRequestMonitor<IExecutionDMContext[]>(fRunCtrl.getExecutor(), null) { new DataRequestMonitor<IExecutionDMContext[]>(fRunCtrl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -177,7 +177,7 @@ public class MIRunControlTest extends BaseTestCase {
new DataRequestMonitor<IExecutionDMContext[]>(fRunCtrl.getExecutor(), null) { new DataRequestMonitor<IExecutionDMContext[]>(fRunCtrl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -249,7 +249,7 @@ public class MIRunControlTest extends BaseTestCase {
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) { new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -290,7 +290,7 @@ public class MIRunControlTest extends BaseTestCase {
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) { new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -339,7 +339,7 @@ public class MIRunControlTest extends BaseTestCase {
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) { new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -375,7 +375,7 @@ public class MIRunControlTest extends BaseTestCase {
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) { new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -412,7 +412,7 @@ public class MIRunControlTest extends BaseTestCase {
new DataRequestMonitor<IExecutionDMContext[]>(fRunCtrl.getExecutor(), null) { new DataRequestMonitor<IExecutionDMContext[]>(fRunCtrl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
fWait.setReturnInfo(getData()); fWait.setReturnInfo(getData());
} }
fWait.waitFinished(getStatus()); fWait.waitFinished(getStatus());
@ -593,7 +593,7 @@ public class MIRunControlTest extends BaseTestCase {
// new DataRequestMonitor<DsfMIInfo>(fRunCtrl.getExecutor(), null) { // new DataRequestMonitor<DsfMIInfo>(fRunCtrl.getExecutor(), null) {
// @Override // @Override
// protected void handleCompleted() { // protected void handleCompleted() {
// if (getStatus().isOK()) { // if (isSuccess()) {
// assert true; // assert true;
// fWait.setReturnInfo(getData()); // fWait.setReturnInfo(getData());
// } // }
@ -618,7 +618,7 @@ public class MIRunControlTest extends BaseTestCase {
// new DataRequestMonitor<DsfMIInfo>(fRunCtrl.getExecutor(), null) { // new DataRequestMonitor<DsfMIInfo>(fRunCtrl.getExecutor(), null) {
// @Override // @Override
// protected void handleCompleted() { // protected void handleCompleted() {
// if (getStatus().isOK()) { // if (isSuccess()) {
// assert true; // assert true;
// fWait.setReturnInfo(getData()); // fWait.setReturnInfo(getData());
// } // }

View file

@ -160,7 +160,7 @@ public class SyncUtil {
new DataRequestMonitor<MIBreakInsertInfo>(fRunControl.getExecutor(), null) { new DataRequestMonitor<MIBreakInsertInfo>(fRunControl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
@ -187,7 +187,7 @@ public class SyncUtil {
new DataRequestMonitor<MIBreakListInfo>(fRunControl.getExecutor(), null) { new DataRequestMonitor<MIBreakListInfo>(fRunControl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
wait.waitFinished(getStatus()); wait.waitFinished(getStatus());
@ -219,7 +219,7 @@ public class SyncUtil {
new DataRequestMonitor<MIInfo>(fRunControl.getExecutor(), null) { new DataRequestMonitor<MIInfo>(fRunControl.getExecutor(), null) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
if (getStatus().isOK()) { if (isSuccess()) {
wait.setReturnInfo(getData()); wait.setReturnInfo(getData());
} }
@ -274,7 +274,7 @@ public class SyncUtil {
protected void execute(final DataRequestMonitor<IFrameDMContext> rm) { protected void execute(final DataRequestMonitor<IFrameDMContext> rm) {
fStack.getFrames(execCtx, new DataRequestMonitor<IFrameDMContext[]>(fSession.getExecutor(), rm) { fStack.getFrames(execCtx, new DataRequestMonitor<IFrameDMContext[]>(fSession.getExecutor(), rm) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
if (getData().length > level) { if (getData().length > level) {
rm.setData(getData()[level]); rm.setData(getData()[level]);
} else { } else {

View file

@ -150,14 +150,14 @@ public class LaunchSequence extends Sequence {
new MIBreakInsert(fCommandControl.getGDBDMContext(), true, false, null, 0, fStopSymbol, 0), new MIBreakInsert(fCommandControl.getGDBDMContext(), true, false, null, 0, fStopSymbol, 0),
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) { new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// After the break-insert is done, execute the -exec-run command. // After the break-insert is done, execute the -exec-run command.
fCommandControl.queueCommand( fCommandControl.queueCommand(
new MIExecRun(fCommandControl.getGDBDMContext(), new String[0]), new MIExecRun(fCommandControl.getGDBDMContext(), new String[0]),
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
// Note : Do we not need to do something with the original requestMonitor? // Note : Do we not need to do something with the original requestMonitor?
// Do nothing. Execution was resumed and the EntryPointHitEventListener // Do nothing. Execution was resumed and the EntryPointHitEventListener
// will resume execution // will resume execution
@ -206,7 +206,7 @@ public class LaunchSequence extends Sequence {
final MIBreakpoints bpService = new MIBreakpoints(fSession); final MIBreakpoints bpService = new MIBreakpoints(fSession);
bpService.initialize(new RequestMonitor(getExecutor(), requestMonitor) { bpService.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
requestMonitor.done(); requestMonitor.done();
} }
}); });
@ -218,7 +218,7 @@ public class LaunchSequence extends Sequence {
final MIBreakpointsManager bpmService = new MIBreakpointsManager(fSession, CDebugCorePlugin.PLUGIN_ID); final MIBreakpointsManager bpmService = new MIBreakpointsManager(fSession, CDebugCorePlugin.PLUGIN_ID);
bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) { bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleOK() { protected void handleSuccess() {
bpmService.startTrackingBreakpoints(fCommandControl.getGDBDMContext(), requestMonitor); bpmService.startTrackingBreakpoints(fCommandControl.getGDBDMContext(), requestMonitor);
} }
}); });