mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 15:25:49 +02:00
[179293] Fixed a bug in handleErrorOrWarning() handling introduced by the last commit for bug 179293.
This commit is contained in:
parent
b927bcd241
commit
fa8d487ab4
4 changed files with 10 additions and 13 deletions
|
@ -97,7 +97,7 @@ public abstract class AbstractExpressionVMNode extends AbstractDMVMNode
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void handleCancelOrErrorOrWarning() {
|
protected void handleNotOK() {
|
||||||
update.setStatus(getStatus());
|
update.setStatus(getStatus());
|
||||||
update.done();
|
update.done();
|
||||||
}
|
}
|
||||||
|
|
|
@ -375,7 +375,7 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
|
||||||
regDmc,
|
regDmc,
|
||||||
new DataRequestMonitor<IBitFieldDMContext[]>(getSession().getExecutor(), null) {
|
new DataRequestMonitor<IBitFieldDMContext[]>(getSession().getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleCancelOrErrorOrWarning() {
|
protected void handleNotOK() {
|
||||||
handleFailedUpdate(update);
|
handleFailedUpdate(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,15 +223,15 @@ public class RequestMonitor {
|
||||||
/**
|
/**
|
||||||
* Default handler for the completion of a request. The implementation
|
* Default handler for the completion of a request. The implementation
|
||||||
* calls {@link #handleOK()} if the request succeeded, and calls
|
* calls {@link #handleOK()} if the request succeeded, and calls
|
||||||
* {@link #handleCancelOrErrorOrWarning()} or cancel otherwise.
|
* {@link #handleNotOK()} or cancel otherwise.
|
||||||
* <br>
|
* <br>
|
||||||
* Note: Sub-classes may override this method.
|
* Note: Sub-classes may override this method.
|
||||||
*/
|
*/
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
if (getStatus().isOK()) {
|
if (getStatus().getSeverity() <= IStatus.INFO) {
|
||||||
handleOK();
|
handleOK();
|
||||||
} else {
|
} else {
|
||||||
handleCancelOrErrorOrWarning();
|
handleNotOK();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ public class RequestMonitor {
|
||||||
* Default handler for a successful the completion of a request. If this
|
* Default handler for a successful the completion of a request. If this
|
||||||
* monitor has a parent monitor that was configured by the constructor, that
|
* monitor has a parent monitor that was configured by the constructor, that
|
||||||
* parent monitor is notified. Otherwise this method does nothing.
|
* parent monitor is notified. Otherwise this method does nothing.
|
||||||
* {@link #handleCancelOrErrorOrWarning()} or cancel otherwise.
|
* {@link #handleNotOK()} or cancel otherwise.
|
||||||
* <br>
|
* <br>
|
||||||
* Note: Sub-classes may override this method.
|
* Note: Sub-classes may override this method.
|
||||||
*/
|
*/
|
||||||
|
@ -256,7 +256,7 @@ public class RequestMonitor {
|
||||||
* <br>
|
* <br>
|
||||||
* Note: Sub-classes may override this method.
|
* Note: Sub-classes may override this method.
|
||||||
*/
|
*/
|
||||||
protected void handleCancelOrErrorOrWarning() {
|
protected void handleNotOK() {
|
||||||
assert !getStatus().isOK();
|
assert !getStatus().isOK();
|
||||||
if (isCanceled()) {
|
if (isCanceled()) {
|
||||||
handleCancel();
|
handleCancel();
|
||||||
|
@ -265,10 +265,8 @@ public class RequestMonitor {
|
||||||
DsfPlugin.getDefault().getLog().log(new Status(
|
DsfPlugin.getDefault().getLog().log(new Status(
|
||||||
IStatus.ERROR, DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Request monitor: '" + this + "' resulted in a cancel status: " + getStatus() + ", even though the request is not set to cancel.", null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
IStatus.ERROR, DsfPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Request monitor: '" + this + "' resulted in a cancel status: " + getStatus() + ", even though the request is not set to cancel.", null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
}
|
}
|
||||||
if (getStatus().getSeverity() == IStatus.ERROR) {
|
if (getStatus().getSeverity() > IStatus.INFO) {
|
||||||
handleError();
|
handleErrorOrWarning();
|
||||||
} else {
|
|
||||||
handleWarning();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.dd.gdb.internal.ui.viewmodel;
|
package org.eclipse.dd.gdb.internal.ui.viewmodel;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.ui.ICDebugUIConstants;
|
|
||||||
import org.eclipse.dd.dsf.concurrent.ThreadSafe;
|
import org.eclipse.dd.dsf.concurrent.ThreadSafe;
|
||||||
import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider;
|
import org.eclipse.dd.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider;
|
||||||
import org.eclipse.dd.dsf.debug.ui.viewmodel.modules.ModulesVMProvider;
|
import org.eclipse.dd.dsf.debug.ui.viewmodel.modules.ModulesVMProvider;
|
||||||
|
@ -52,7 +51,7 @@ public class GdbViewModelAdapter extends AbstractDMVMAdapter
|
||||||
return new RegisterVMProvider(this, context, getSession());
|
return new RegisterVMProvider(this, context, getSession());
|
||||||
} else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
|
} else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
|
||||||
return new ExpressionVMProvider(this, context, getSession());
|
return new ExpressionVMProvider(this, context, getSession());
|
||||||
} else if (ICDebugUIConstants.ID_MODULES_VIEW.equals(context.getId()) ) {
|
} else if (IDebugUIConstants.ID_MODULE_VIEW.equals(context.getId()) ) {
|
||||||
return new ModulesVMProvider(this, context, getSession());
|
return new ModulesVMProvider(this, context, getSession());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue