mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +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
|
||||
protected void handleCancelOrErrorOrWarning() {
|
||||
protected void handleNotOK() {
|
||||
update.setStatus(getStatus());
|
||||
update.done();
|
||||
}
|
||||
|
|
|
@ -375,7 +375,7 @@ public class RegisterBitFieldVMNode extends AbstractExpressionVMNode
|
|||
regDmc,
|
||||
new DataRequestMonitor<IBitFieldDMContext[]>(getSession().getExecutor(), null) {
|
||||
@Override
|
||||
protected void handleCancelOrErrorOrWarning() {
|
||||
protected void handleNotOK() {
|
||||
handleFailedUpdate(update);
|
||||
}
|
||||
|
||||
|
|
|
@ -223,15 +223,15 @@ public class RequestMonitor {
|
|||
/**
|
||||
* Default handler for the completion of a request. The implementation
|
||||
* calls {@link #handleOK()} if the request succeeded, and calls
|
||||
* {@link #handleCancelOrErrorOrWarning()} or cancel otherwise.
|
||||
* {@link #handleNotOK()} or cancel otherwise.
|
||||
* <br>
|
||||
* Note: Sub-classes may override this method.
|
||||
*/
|
||||
protected void handleCompleted() {
|
||||
if (getStatus().isOK()) {
|
||||
if (getStatus().getSeverity() <= IStatus.INFO) {
|
||||
handleOK();
|
||||
} else {
|
||||
handleCancelOrErrorOrWarning();
|
||||
handleNotOK();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ 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 #handleCancelOrErrorOrWarning()} or cancel otherwise.
|
||||
* {@link #handleNotOK()} or cancel otherwise.
|
||||
* <br>
|
||||
* Note: Sub-classes may override this method.
|
||||
*/
|
||||
|
@ -256,7 +256,7 @@ public class RequestMonitor {
|
|||
* <br>
|
||||
* Note: Sub-classes may override this method.
|
||||
*/
|
||||
protected void handleCancelOrErrorOrWarning() {
|
||||
protected void handleNotOK() {
|
||||
assert !getStatus().isOK();
|
||||
if (isCanceled()) {
|
||||
handleCancel();
|
||||
|
@ -265,10 +265,8 @@ public class RequestMonitor {
|
|||
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$
|
||||
}
|
||||
if (getStatus().getSeverity() == IStatus.ERROR) {
|
||||
handleError();
|
||||
} else {
|
||||
handleWarning();
|
||||
if (getStatus().getSeverity() > IStatus.INFO) {
|
||||
handleErrorOrWarning();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
*******************************************************************************/
|
||||
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.debug.ui.viewmodel.expression.ExpressionVMProvider;
|
||||
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());
|
||||
} else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
|
||||
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 null;
|
||||
|
|
Loading…
Add table
Reference in a new issue