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) {
|
new DataRequestMonitor<FormattedValueDMData>(finalService.getSession().getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
public void handleCompleted() {
|
public void handleCompleted() {
|
||||||
if (getStatus().isOK()) {
|
if (isSuccess()) {
|
||||||
/*
|
/*
|
||||||
* Show the information indicating the format.
|
* 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) {
|
final MultiRequestMonitor<DataRequestMonitor<Boolean>> multiRm = new MultiRequestMonitor<DataRequestMonitor<Boolean>>(getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
if (getStatus().isOK()) {
|
if (isSuccess()) {
|
||||||
boolean foundMatchingContext = false;
|
boolean foundMatchingContext = false;
|
||||||
for (int i = 0; i < getRequestMonitors().size(); i++) {
|
for (int i = 0; i < getRequestMonitors().size(); i++) {
|
||||||
if (getRequestMonitors().get(i).getData()) {
|
if (getRequestMonitors().get(i).getData()) {
|
||||||
|
|
|
@ -71,7 +71,7 @@ class VMExpressionUpdate extends VMViewerUpdate implements IExpressionUpdate {
|
||||||
DataRequestMonitor<Object> rm = (DataRequestMonitor<Object>)getRequestMonitor();
|
DataRequestMonitor<Object> rm = (DataRequestMonitor<Object>)getRequestMonitor();
|
||||||
if (fExpressionElement != null) {
|
if (fExpressionElement != null) {
|
||||||
rm.setData(fExpressionElement);
|
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$
|
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
super.done();
|
super.done();
|
||||||
|
|
|
@ -379,7 +379,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
|
||||||
new DataRequestMonitor<List<Object>>(getExecutor(), null) {
|
new DataRequestMonitor<List<Object>>(getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
public void handleCompleted() {
|
public void handleCompleted() {
|
||||||
if (getStatus().isOK() && getData().size() != 0) {
|
if (isSuccess() && getData().size() != 0) {
|
||||||
parentDelta.addNode( getData().get(0), 0, IModelDelta.SELECT | IModelDelta.STATE);
|
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
|
// If second frame is available repaint it, so that a "..." appears. This gives a better
|
||||||
// impression that the frames are not up-to date.
|
// impression that the frames are not up-to date.
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
|
||||||
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
public void handleCompleted() {
|
public void handleCompleted() {
|
||||||
if (!getStatus().isOK()) {
|
if (!isSuccess()) {
|
||||||
handleFailedUpdate(update);
|
handleFailedUpdate(update);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,7 +330,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
||||||
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
public void handleCompleted() {
|
public void handleCompleted() {
|
||||||
if (!getStatus().isOK()) {
|
if (!isSuccess()) {
|
||||||
handleFailedUpdate(update);
|
handleFailedUpdate(update);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -606,7 +606,7 @@ public class VariableVMNode extends AbstractExpressionVMNode
|
||||||
new DataRequestMonitor<IVariableDMContext[]>(dsfExecutor, null) {
|
new DataRequestMonitor<IVariableDMContext[]>(dsfExecutor, null) {
|
||||||
@Override
|
@Override
|
||||||
public void handleCompleted() {
|
public void handleCompleted() {
|
||||||
if (!getStatus().isOK()) {
|
if (!isSuccess()) {
|
||||||
handleFailedUpdate(update);
|
handleFailedUpdate(update);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,9 +321,9 @@ public class DefaultVMContentProviderStrategy implements IElementContentProvider
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
// Workaround for a bug caused by an optimization in the viewer:
|
// Workaround for a bug caused by an optimization in the viewer:
|
||||||
// The viewer may request more children then there are at a given level.
|
// The viewer may request more children then there are at a given level.
|
||||||
// This 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
|
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=202109
|
||||||
// Instead of checking getStatus().isOK(), check getData() != null.
|
// Instead of checking isSuccess(), check getData() != null.
|
||||||
if (getData() != null) {
|
if (getData() != null) {
|
||||||
for (int i = 0; i < elementsLength && i < getData().size(); i++) {
|
for (int i = 0; i < elementsLength && i < getData().size(); i++) {
|
||||||
Object child = getData().get(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
|
// Check for an empty list of elements. If it's empty then we
|
||||||
// don't have to call the children nodes, so return here.
|
// don't have to call the children nodes, so return here.
|
||||||
// No need to propagate error, there's no means or need to display it.
|
// No need to propagate error, there's no means or need to display it.
|
||||||
if (!getStatus().isOK() || getData().size() == 0) {
|
if (!isSuccess() || getData().size() == 0) {
|
||||||
requestMonitor.done();
|
requestMonitor.done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class VMChildrenCountUpdate extends VMViewerUpdate implements IChildrenCo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void done() {
|
public void done() {
|
||||||
assert isCanceled() || fCountRequestMonitor.getData() != null || !fCountRequestMonitor.getStatus().isOK();
|
assert isCanceled() || fCountRequestMonitor.getData() != null || !fCountRequestMonitor.isSuccess();
|
||||||
super.done();
|
super.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate
|
||||||
* the error status.
|
* the error status.
|
||||||
*/
|
*/
|
||||||
rm.setData(fElements);
|
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$
|
rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "Incomplete elements of updates", null)); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
super.done();
|
super.done();
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class VMHasChildrenUpdate extends VMViewerUpdate implements IHasChildrenU
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void done() {
|
public void done() {
|
||||||
assert isCanceled() || fHasElemsRequestMonitor.getData() != null || !fHasElemsRequestMonitor.getStatus().isOK();
|
assert isCanceled() || fHasElemsRequestMonitor.getData() != null || !fHasElemsRequestMonitor.isSuccess();
|
||||||
super.done();
|
super.done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class ShutdownSequence extends Sequence {
|
||||||
// @Override
|
// @Override
|
||||||
// protected void handleCompleted() {
|
// protected void handleCompleted() {
|
||||||
// // If un-installing breakpoints fails, log the error but continue shutting down.
|
// // If un-installing breakpoints fails, log the error but continue shutting down.
|
||||||
// if (!getStatus().isOK()) {
|
// if (!isSuccess) {
|
||||||
// DsfGdbLaunchPlugin.getDefault().getLog().log(getStatus());
|
// DsfGdbLaunchPlugin.getDefault().getLog().log(getStatus());
|
||||||
// }
|
// }
|
||||||
// requestMonitor.done();
|
// requestMonitor.done();
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class ThreadVMNode extends AbstractDMVMNode
|
||||||
new DataRequestMonitor<IExecutionDMData>(getSession().getExecutor(), null) {
|
new DataRequestMonitor<IExecutionDMData>(getSession().getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
public void handleCompleted(){
|
public void handleCompleted(){
|
||||||
if (!getStatus().isOK()) {
|
if (!isSuccess()) {
|
||||||
handleFailedUpdate(update);
|
handleFailedUpdate(update);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -871,7 +871,7 @@ public class MIVariableManager extends AbstractDsfService implements ICommandCon
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the value has not changed, no need to set it.
|
// 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
|
// an ExpressionChanged event
|
||||||
if (value.equals(getValue(formatId))) {
|
if (value.equals(getValue(formatId))) {
|
||||||
rm.setStatus(new Status(IStatus.WARNING, MIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED,
|
rm.setStatus(new Status(IStatus.WARNING, MIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED,
|
||||||
|
|
Loading…
Add table
Reference in a new issue