mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[179293] Coverted remaining RequestMonitor.getStatus().isOK() calls into RequestMonitor.isSuccess().
This commit is contained in:
parent
c60f80ccc0
commit
0e806a078c
14 changed files with 16 additions and 16 deletions
|
@ -404,7 +404,7 @@ public class NumberFormatDetailPane implements IDetailPane, IAdaptable, IPropert
|
|||
new DataRequestMonitor<FormattedValueDMData>(finalService.getSession().getExecutor(), null) {
|
||||
@Override
|
||||
public void handleCompleted() {
|
||||
if (getStatus().isOK()) {
|
||||
if (isSuccess()) {
|
||||
/*
|
||||
* Show the information indicating the format.
|
||||
*/
|
||||
|
|
|
@ -61,7 +61,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode
|
|||
final MultiRequestMonitor<DataRequestMonitor<Boolean>> multiRm = new MultiRequestMonitor<DataRequestMonitor<Boolean>>(getExecutor(), null) {
|
||||
@Override
|
||||
protected void handleCompleted() {
|
||||
if (getStatus().isOK()) {
|
||||
if (isSuccess()) {
|
||||
boolean foundMatchingContext = false;
|
||||
for (int i = 0; i < getRequestMonitors().size(); i++) {
|
||||
if (getRequestMonitors().get(i).getData()) {
|
||||
|
|
|
@ -71,7 +71,7 @@ class VMExpressionUpdate extends VMViewerUpdate implements IExpressionUpdate {
|
|||
DataRequestMonitor<Object> rm = (DataRequestMonitor<Object>)getRequestMonitor();
|
||||
if (fExpressionElement != null) {
|
||||
rm.setData(fExpressionElement);
|
||||
} else if (rm.getStatus().isOK()) {
|
||||
} else if (rm.isSuccess()) {
|
||||
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$
|
||||
}
|
||||
super.done();
|
||||
|
|
|
@ -379,7 +379,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.STATE);
|
||||
// If second frame is available repaint it, so that a "..." appears. This gives a better
|
||||
// impression that the frames are not up-to date.
|
||||
|
|
|
@ -179,7 +179,7 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
|
|||
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
||||
@Override
|
||||
public void handleCompleted() {
|
||||
if (!getStatus().isOK()) {
|
||||
if (!isSuccess()) {
|
||||
handleFailedUpdate(update);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -330,7 +330,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
|||
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
||||
@Override
|
||||
public void handleCompleted() {
|
||||
if (!getStatus().isOK()) {
|
||||
if (!isSuccess()) {
|
||||
handleFailedUpdate(update);
|
||||
return;
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
|||
new DataRequestMonitor<IVariableDMContext[]>(dsfExecutor, null) {
|
||||
@Override
|
||||
public void handleCompleted() {
|
||||
if (!getStatus().isOK()) {
|
||||
if (!isSuccess()) {
|
||||
handleFailedUpdate(update);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -321,9 +321,9 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
|
|||
protected void handleCompleted() {
|
||||
// Workaround for a bug caused by an optimization in the viewer:
|
||||
// The viewer may request more children then there are at a given level.
|
||||
// This caues the update to return with an error.
|
||||
// This causes the update to return with an error.
|
||||
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=202109
|
||||
// Instead of checking getStatus().isOK(), check getData() != null.
|
||||
// Instead of checking isSuccess(), check getData() != null.
|
||||
if (getData() != null) {
|
||||
for (int i = 0; i < elementsLength && i < getData().size(); i++) {
|
||||
Object child = getData().get(i);
|
||||
|
|
|
@ -443,7 +443,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().size() == 0) {
|
||||
if (!isSuccess() || getData().size() == 0) {
|
||||
requestMonitor.done();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class VMChildrenCountUpdate extends VMViewerUpdate implements IChildrenCo
|
|||
|
||||
@Override
|
||||
public void done() {
|
||||
assert isCanceled() || fCountRequestMonitor.getData() != null || !fCountRequestMonitor.getStatus().isOK();
|
||||
assert isCanceled() || fCountRequestMonitor.getData() != null || !fCountRequestMonitor.isSuccess();
|
||||
super.done();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate
|
|||
* the error status.
|
||||
*/
|
||||
rm.setData(fElements);
|
||||
if (rm.getStatus().isOK() && fLength != -1 && fElements.size() != fLength) {
|
||||
if (rm.isSuccess() && fLength != -1 && fElements.size() != fLength) {
|
||||
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$
|
||||
}
|
||||
super.done();
|
||||
|
|
|
@ -48,7 +48,7 @@ public class VMHasChildrenUpdate extends VMViewerUpdate implements IHasChildrenU
|
|||
|
||||
@Override
|
||||
public void done() {
|
||||
assert isCanceled() || fHasElemsRequestMonitor.getData() != null || !fHasElemsRequestMonitor.getStatus().isOK();
|
||||
assert isCanceled() || fHasElemsRequestMonitor.getData() != null || !fHasElemsRequestMonitor.isSuccess();
|
||||
super.done();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ public class ShutdownSequence extends Sequence {
|
|||
// @Override
|
||||
// protected void handleCompleted() {
|
||||
// // If un-installing breakpoints fails, log the error but continue shutting down.
|
||||
// if (!getStatus().isOK()) {
|
||||
// if (!isSuccess) {
|
||||
// DsfGdbLaunchPlugin.getDefault().getLog().log(getStatus());
|
||||
// }
|
||||
// requestMonitor.done();
|
||||
|
|
|
@ -214,7 +214,7 @@ public class ThreadVMNode extends AbstractDMVMNode
|
|||
new DataRequestMonitor<IExecutionDMData>(getSession().getExecutor(), null) {
|
||||
@Override
|
||||
public void handleCompleted(){
|
||||
if (!getStatus().isOK()) {
|
||||
if (!isSuccess()) {
|
||||
handleFailedUpdate(update);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -871,7 +871,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
|
|||
}
|
||||
|
||||
// If the value has not changed, no need to set it.
|
||||
// Return a status info so that handleOK is not called and we don't send
|
||||
// Return a warning status so that handleSuccess is not called and we don't send
|
||||
// an ExpressionChanged event
|
||||
if (value.equals(getValue(formatId))) {
|
||||
rm.setStatus(new Status(IStatus.WARNING, MIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED,
|
||||
|
|
Loading…
Add table
Reference in a new issue