1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 14:45:25 +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 =
new DataRequestMonitor<String[]>(finalService.getSession().getExecutor(), null) {
@Override
protected void handleOK() {
protected void handleSuccess() {
/*
* 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

View file

@ -285,7 +285,7 @@ public class MISourceDisplayAdapter implements ISourceDisplay
frameDmc,
new DataRequestMonitor<IFrameDMData>(fExecutor, rm) {
@Override
public void handleOK() {
public void handleSuccess() {
FramePositioningData clientData = new FramePositioningData();
clientData.fLevel = frameDmc.getLevel();
// 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,
new ViewerDataRequestMonitor<List<Object>>(getExecutor(), update) {
@Override
protected void handleOK() {
protected void handleSuccess() {
if (getData().size() == 0) {
update.setStatus(new Status(IStatus.ERROR, DsfDebugUIPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "No contexts", null)); //$NON-NLS-1$
update.done();
@ -97,7 +97,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode
}
@Override
protected void handleNotOK() {
protected void handleFailure() {
update.setStatus(getStatus());
update.done();
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -134,13 +134,14 @@ public class SyncVariableDataAccess {
*/
if (!DsfSession.isSessionActive(session.getId())) {
GetVariableValueQuery.this.cancel(false);
rm.done();
return;
}
super.handleCompleted();
}
@Override
protected void handleOK() {
protected void handleSuccess() {
/*
* All good set return value.
*/
@ -248,7 +249,7 @@ public class SyncVariableDataAccess {
}
@Override
protected void handleOK() {
protected void handleSuccess() {
/*
* All good set return value.
*/
@ -357,7 +358,7 @@ public class SyncVariableDataAccess {
}
@Override
protected void handleOK() {
protected void handleSuccess() {
/*
* All good set return value.
*/
@ -456,7 +457,7 @@ public class SyncVariableDataAccess {
}
@Override
protected void handleOK() {
protected void handleSuccess() {
/*
* All good set return value.
*/
@ -546,7 +547,7 @@ public class SyncVariableDataAccess {
}
@Override
protected void handleOK() {
protected void handleSuccess() {
/*
* 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
// has not been updated yet.
if (!getStatus().isOK()) {
if (!isSuccess()) {
assert getStatus().isOK() ||
getStatus().getCode() != IDsfStatusConstants.INTERNAL_ERROR ||
getStatus().getCode() != IDsfStatusConstants.NOT_SUPPORTED;
@ -380,7 +380,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) {
@Override
public void handleCompleted() {
if (!getStatus().isOK()) {
if (!isSuccess()) {
handleFailedUpdate(update);
return;
}
@ -567,7 +567,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
new DataRequestMonitor<IExpressionDMContext[]>(dsfExecutor, null) {
@Override
public void handleCompleted() {
if (!getStatus().isOK()) {
if (!isSuccess()) {
handleFailedUpdate(update);
return;
}
@ -645,7 +645,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
// IExpressionDMContext object for each local variable name, saving them all
// in an array.
if (!getStatus().isOK()) {
if (!isSuccess()) {
handleFailedUpdate(update);
return;
}

View file

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

View file

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

View file

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

View file

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

View file

@ -369,7 +369,7 @@ public class CommandCache implements ICommandListener
fCachedContexts.put(context, map);
}
if (!status.isOK()) {
if (!isSuccess()) {
/*
* 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(
frameDmc,
new DataRequestMonitor<IFrameDMData>(fExecutor, rm) { @Override
public void handleOK() {
public void handleSuccess() {
rm.setData(getData().getFile());
rm.done();
}});

View file

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

View file

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

View file

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

View file

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

View file

@ -250,7 +250,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
getRootElement(), event,
new DataRequestMonitor<VMDelta>(getVMProvider().getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// 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
// in case when the view model provider is registered to populate only
@ -272,7 +272,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
childNodesWithDeltaFlags, getData(), event,
new RequestMonitor(getVMProvider().getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(viewRootDelta);
rm.done();
}
@ -290,7 +290,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
new DataRequestMonitor<IVMContext[]>(getVMProvider().getExecutor(), rm) {
@Override
protected void handleCompleted() {
if (getStatus().isOK()) {
if (isSuccess()) {
assert getData() != null;
buildChildDeltasForEventContext(getData(), node, event, parentDelta, nodeOffset, rm);
} 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
// 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.
if (!getStatus().isOK() || getData().isEmpty()) {
if (!isSuccess() || getData().isEmpty()) {
requestMonitor.done();
return;
}
@ -525,7 +525,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
event, delta, nodeOffset,
new RequestMonitor(getVMProvider().getExecutor(), multiRm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
buildChildDeltas(
childNode, event, delta, nodeOffset, new RequestMonitor(getVMProvider().getExecutor(), multiRm));
}
@ -568,7 +568,7 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
super.handleCompleted();
}
@Override
protected void handleOK() {
protected void handleSuccess() {
Map<IVMNode, Integer> data = new HashMap<IVMNode, Integer>();
int offset = 0;
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) {
@Override
protected void handleCompleted() {
if (getStatus().isOK()) {
if (isSuccess()) {
updateLabel(labelUpdate, getData());
}
labelUpdate.done();

View file

@ -298,7 +298,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
new VMHasChildrenUpdate(update, new DataRequestMonitor<Boolean>(getExecutor(), null) {
@Override
protected void handleCompleted() {
if(getStatus().isOK()) {
if(isSuccess()) {
entry.fHasChildren = this.getData();
update.setHasChilren(getData());
} else {
@ -326,7 +326,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
IChildrenCountUpdate updateProxy = new VMChildrenCountUpdate(update, new DataRequestMonitor<Integer>(getExecutor(), null) {
@Override
protected void handleCompleted() {
if(getStatus().isOK()) {
if(isSuccess()) {
entry.fChildrenCount = this.getData();
update.setChildCount(getData());
} 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.
// This causes the update to return with an error.
// 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) {
// Check if the udpate retrieved all children by specifying "offset = -1, length = -1"
int updateOffset = update.getOffset();
@ -578,7 +578,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
@Override
public void handleCompleted() {
if (getStatus().isOK()) {
if (isSuccess()) {
proxyStrategy.fireModelChanged(getData());
}
}
@ -731,7 +731,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
new DataRequestMonitor<IDMData>(executor, rm) {
@Override
protected void handleCompleted() {
if (getStatus().isOK()) {
if (isSuccess()) {
entry.fDataOrStatus.put(dmc, getData());
rm.setData(getData());
} else {

View file

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

View file

@ -33,12 +33,28 @@ import org.eclipse.dd.dsf.internal.DsfPlugin;
* as an argument.
* </p>
* <p>
* This class handles 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
* The severity of the {@link IStatus> returned by #getStatus() can be used to
* determine the success or failure of the asynchronous operation. By convention
* the error codes returned by asynchronous method should be interpreted as follows:
* <ul>
* <li>OK and INFO - Result is a success. In DataRequestMonitor, getData() should
* 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
* parent <code>rm</code> in case the <code>getIngredients()</code> call fails.
* <pre>
@ -54,7 +70,7 @@ import org.eclipse.dd.dsf.internal.DsfPlugin;
* </pre>
* </p>
*/
@ConfinedToDsfExecutor("")
@ThreadSafe
public class RequestMonitor {
/**
@ -132,9 +148,17 @@ public class RequestMonitor {
/**
* 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
* the asynchronous operation to cancel the operation. Even after the request
* monitor is canceled, the done() method still has to be called.
* <p>
* Note: Calling cancel() does not automatically complete the RequestMonitor.
* 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() {
Object[] listeners = null;
@ -180,10 +204,9 @@ public class RequestMonitor {
* when this request monitor is canceled.
*/
public synchronized void removeCancelListener(ICanceledListener listener) {
if (fCancelListeners == null) {
fCancelListeners = new ListenerList();
if (fCancelListeners != null) {
fCancelListeners.remove(listener);
}
fCancelListeners.remove(listener);
}
/**
@ -219,19 +242,29 @@ public class RequestMonitor {
public String toString() {
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
* calls {@link #handleOK()} if the request succeeded, and calls
* {@link #handleNotOK()} or cancel otherwise.
* calls {@link #handleSuccess()} if the request succeeded, and calls
* {@link #handleFailure()} or cancel otherwise.
* <br>
* Note: Sub-classes may override this method.
*/
@ConfinedToDsfExecutor("fExecutor")
protected void handleCompleted() {
if (getStatus().getSeverity() <= IStatus.INFO) {
handleOK();
if (isSuccess()) {
handleSuccess();
} else {
handleNotOK();
handleFailure();
}
}
@ -239,11 +272,12 @@ public class RequestMonitor {
* Default handler for a successful the completion of a request. If this
* monitor has a parent monitor that was configured by the constructor, that
* parent monitor is notified. Otherwise this method does nothing.
* {@link #handleNotOK()} or cancel otherwise.
* {@link #handleFailure()} or cancel otherwise.
* <br>
* Note: Sub-classes may override this method.
*/
protected void handleOK() {
@ConfinedToDsfExecutor("fExecutor")
protected void handleSuccess() {
if (fParentRequestMonitor != null) {
fParentRequestMonitor.done();
}
@ -256,7 +290,8 @@ public class RequestMonitor {
* <br>
* Note: Sub-classes may override this method.
*/
protected void handleNotOK() {
@ConfinedToDsfExecutor("fExecutor")
protected void handleFailure() {
assert !getStatus().isOK();
if (isCanceled()) {
handleCancel();
@ -278,6 +313,7 @@ public class RequestMonitor {
* <br>
* Note: Sub-classes may override this method.
*/
@ConfinedToDsfExecutor("fExecutor")
protected void handleErrorOrWarning() {
if (getStatus().getSeverity() == IStatus.ERROR) {
handleError();
@ -294,6 +330,7 @@ public class RequestMonitor {
* <br>
* Note: Sub-classes may override this method.
*/
@ConfinedToDsfExecutor("fExecutor")
protected void handleError() {
if (fParentRequestMonitor != null) {
fParentRequestMonitor.setStatus(getStatus());
@ -313,14 +350,11 @@ public class RequestMonitor {
* <br>
* Note: Sub-classes may override this method.
*/
@ConfinedToDsfExecutor("fExecutor")
protected void handleWarning() {
if (fParentRequestMonitor != null) {
fParentRequestMonitor.setStatus(getStatus());
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>
* Note: Sub-classes may override this method.
*/
@ConfinedToDsfExecutor("fExecutor")
protected void handleCancel() {
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();
}
}
@ -343,6 +383,7 @@ public class RequestMonitor {
* rejects the runnable that is submitted invoke this request monitor.
* This usually happens only when the executor is shutting down.
*/
@ThreadSafe
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$
logStatus.merge(getStatus());

View file

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

View file

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

View file

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

View file

@ -230,7 +230,7 @@ implements ITerminate
@Override
public void handleCompleted() {
fSession.removeServiceEventListener(PDALaunch.this);
if (!getStatus().isOK()) {
if (!isSuccess()) {
PDAPlugin.getDefault().getLog().log(new MultiStatus(
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());
bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
@Override
protected void handleOK() {
protected void handleSuccess() {
bpmService.startTrackingBreakpoints(fCommandControl.getProgramDMContext(), requestMonitor);
}
});

View file

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

View file

@ -134,7 +134,7 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
public void initialize(final RequestMonitor rm) {
super.initialize(new RequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
doInitialize(rm);
}
});
@ -247,17 +247,17 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
new PDASetBreakpointCommand(fCommandControl.getProgramDMContext(), line),
new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(breakpointCtx);
rm.done();
}
@Override
protected void handleNotOK() {
protected void handleFailure() {
// If inserting of the breakpoint failed, remove it from
// the set of installed breakpoints.
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 DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(watchpointCtx);
rm.done();
}
@Override
protected void handleNotOK() {
protected void handleFailure() {
// Since the command failed, we need to remove the breakpoint from
// the existing breakpoint set.
fBreakpoints.remove(watchpointCtx);
super.handleNotOK();
super.handleFailure();
}
});
}
@ -389,7 +389,7 @@ public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
attributes,
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// The inserted watchpoint context will equal the
// current context.
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.
super.initialize( new RequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
doInitialize(rm);
}
});
@ -141,7 +141,7 @@ public class PDACommandControl extends AbstractDsfService implements ICommandCon
// completed.
final RequestMonitor socketsInitializeRm = new RequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Register the service with OSGi as the last step in initialization of
// the service.
register(

View file

@ -181,7 +181,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
super.initialize(
new RequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
doInitialize(rm);
}});
}
@ -284,7 +284,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
frameCtx, 0,
new DataRequestMonitor<Integer>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Calculate the frame index.
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 DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(new FormattedValueDMData(getData().fResponseText));
rm.done();
}
@ -318,7 +318,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions {
frameCtx, 0,
new DataRequestMonitor<Integer>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Calculate the frame index.
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 DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
getSession().dispatchEvent(new ExpressionChangedDMEvent(exprCtx), getProperties());
rm.done();
}

View file

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

View file

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

View file

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

View file

@ -144,7 +144,7 @@ public class GdbLaunch extends Launch
@Override
public void handleCompleted() {
fSession.removeServiceEventListener(GdbLaunch.this);
if (!getStatus().isOK()) {
if (!isSuccess()) {
GdbLaunchPlugin.getDefault().getLog().log(new MultiStatus(
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) {
@Override
protected void handleCompleted() {
if (!getStatus().isOK()) {
if (!isSuccess()) {
GdbLaunchPlugin.getDefault().getLog().log(getStatus());
}
requestMonitor.done();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -418,7 +418,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
public void initialize(final RequestMonitor requestMonitor) {
super.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
@Override
protected void handleOK() {
protected void handleSuccess() {
doInitialize(requestMonitor);
}
});
@ -588,7 +588,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetVar(dmc),
new DataRequestMonitor<ExprMetaGetVarInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(new ExpressionDMData(getData().getExpr(),
getData().getType(), getData().getNumChildren(), getData().getEditable()));
rm.done();
@ -630,7 +630,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(addressDmc),
new DataRequestMonitor<MIDataEvaluateExpressionInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
String tmpAddrStr = getData().getValue();
// 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 DataRequestMonitor<MIDataEvaluateExpressionInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
try {
int size = Integer.parseInt(getData().getValue());
rm.setData(new ExpressionDMAddress(addrStr, size));
@ -686,7 +686,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetValue(dmc),
new DataRequestMonitor<ExprMetaGetValueInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(new FormattedValueDMData(getData().getValue()));
rm.done();
}
@ -723,7 +723,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetChildren(dmc),
new DataRequestMonitor<ExprMetaGetChildrenInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
ExpressionInfo[] childrenExpr = getData().getChildrenExpressions();
IExpressionDMContext[] childArray = new IExpressionDMContext[childrenExpr.length];
for (int i=0; i<childArray.length; i++) {
@ -766,7 +766,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
exprCtx,
new DataRequestMonitor<IExpressionDMContext[]>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData((IExpressionDMContext[])Arrays.asList(getData()).subList(startIndex, startIndex + length).toArray());
rm.done();
}
@ -790,7 +790,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetChildCount(dmc),
new DataRequestMonitor<ExprMetaGetChildCountInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(getData().getChildNum());
rm.done();
}
@ -818,7 +818,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
new ExprMetaGetAttributes(dmc),
new DataRequestMonitor<ExprMetaGetAttributesInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
rm.setData(getData().getEditable());
rm.done();
}
@ -858,7 +858,7 @@ public class ExpressionService extends AbstractDsfService implements IExpression
formatId,
new RequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// A value has changed, we should remove any references to that
// value in our cache. Since we don't have such granularity,
// 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) {
super.initialize(new RequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
doInitialize(rm);
}
});
@ -309,7 +309,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
fConnection.queueCommand(new MIBreakList(context),
new DataRequestMonitor<MIBreakListInfo>(getExecutor(), drm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Refresh the breakpoints map and format the result
breakpointContext.clear();
MIBreakpoint[] breakpoints = getData().getMIBreakpoints();
@ -484,7 +484,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
DataRequestMonitor<MIBreakInsertInfo> addBreakpointDRM =
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// With MI, an invalid location won't generate an error
if (getData().getMIBreakpoints().length == 0) {
@ -555,7 +555,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
DataRequestMonitor<MIBreakInsertInfo> addWatchpointDRM =
new DataRequestMonitor<MIBreakInsertInfo>(getExecutor(), drm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// With MI, an invalid location won't generate an error
if (getData().getMIBreakpoints().length == 0) {
@ -659,7 +659,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override
protected void handleCompleted() {
if (getStatus().isOK()) {
if (isSuccess()) {
getSession().dispatchEvent(new BreakpointRemovedEvent(dmc), getProperties());
contextBreakpoints.remove(reference);
}
@ -746,7 +746,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
int numberOfChanges = 0;
final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
if (generateUpdateEvent)
getSession().dispatchEvent(new BreakpointUpdatedEvent(dmc), getProperties());
rm.done();
@ -830,7 +830,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
rm.done();
return;
}
if (getStatus().isOK()) {
if (isSuccess()) {
breakpoint.setCondition(condition);
}
else {
@ -867,7 +867,7 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
new MIBreakAfter(context, reference, ignoreCount),
new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
MIBreakpointDMData breakpoint = contextBreakpoints.get(reference);
if (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 DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
MIBreakpointDMData breakpoint = contextBreakpoints.get(reference);
if (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 DataRequestMonitor<MIInfo>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
MIBreakpointDMData breakpoint = contextBreakpoints.get(reference);
if (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(
new RequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
doInitialize(rm);
}});
}
@ -412,7 +412,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// Upon determining the debuggerPath, the breakpoint is installed
determineDebuggerPath(dmc, attributes, new RequestMonitor(getExecutor(), countingRm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
installBreakpoint(dmc, breakpoint, attributes, new RequestMonitor(getExecutor(), countingRm));
}
});
@ -549,7 +549,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
DataRequestMonitor<IBreakpointDMContext> drm =
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Add the new back-end breakpoint to the map
Vector<IBreakpointDMContext> list = breakpointIDs.get(breakpoint);
if (list == null)
@ -684,7 +684,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// Upon completion, update the mappings
CountingRequestMonitor removeRM = new CountingRequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Update the mappings
platformBPs.remove(breakpoint);
threadsIDs.remove(breakpoint);
@ -804,7 +804,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
// Update completion monitor
final CountingRequestMonitor updateRM = new CountingRequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Success: simply store the new attributes
platformBPs.put(breakpoint, attributes);
rm.done();
@ -828,7 +828,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
final Vector<IBreakpointDMContext> newTargetBPs = new Vector<IBreakpointDMContext>();
final CountingRequestMonitor removeRM = new CountingRequestMonitor(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// All right! Save the new list and perform the final update
Map<ICBreakpoint, Vector<IBreakpointDMContext>> breakpointIDs = fBreakpointIDs.get(dmc);
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
// list would be invalid. We think it is highly unlikely so we assume that
// either everything went fine or else everything failed.
protected void handleOK() {
protected void handleSuccess() {
// Get the list of new back-end breakpoints contexts
newTargetBPs.addAll(getData());
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
final CountingRequestMonitor installRM = new CountingRequestMonitor(getExecutor(), drm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Report whatever we have managed to install
// It is very likely installation either succeeded or failed for all
drm.setData(breakpointList);
@ -932,7 +932,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
fBreakpoints.insertBreakpoint(context, attrs,
new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), installRM) {
@Override
protected void handleOK() {
protected void handleSuccess() {
// Add the new back-end breakpoint context to the list
breakpointList.add(getData());
try {
@ -1011,7 +1011,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
determineDebuggerPath(dmc, attrs,
new RequestMonitor(getExecutor(), countingRm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
installBreakpoint(dmc, (ICBreakpoint) breakpoint,
attrs, new RequestMonitor(getExecutor(), countingRm));
}
@ -1064,7 +1064,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
@Override
protected void handleCompleted() {
if (!getStatus().isOK()) {
if (!isSuccess()) {
if (getStatus().getSeverity() == IStatus.ERROR) {
MIPlugin.getDefault().getLog().log(getStatus());
}
@ -1090,7 +1090,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
determineDebuggerPath(dmc, attrs,
new RequestMonitor(getExecutor(), countingRm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
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,
new DataRequestMonitor<String>(getExecutor(), rm) {
@Override
protected void handleOK() {
protected void handleSuccess() {
attributes.put(ATTR_DEBUGGER_PATH, getData());
rm.done();
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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