1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Restructure oddly and inefficiently constructed if/else section

This commit is contained in:
John Cortell 2009-10-07 02:42:21 +00:00
parent e61498f16f
commit 1bfac4dbe8

View file

@ -371,20 +371,17 @@ public class DefaultVMModelProxyStrategy implements IVMModelProxy {
new DataRequestMonitor<IVMContext[]>(getVMProvider().getExecutor(), rm) {
@Override
protected void handleCompleted() {
if (isSuccess() || getStatus().getCode() == IDsfStatusConstants.NOT_SUPPORTED) {
if (isSuccess()) {
assert getData() != null;
buildChildDeltasForEventContext(
getData(), node, event, parentDelta, nodeOffset, rm);
} else {
// The DMC for this node was not found in the event. Call the
// super-class to resort to the default behavior which will add a
// delta for every element in this node.
buildChildDeltasForAllContexts(
node, event, parentDelta, nodeOffset, rm);
}
} else {
if (isSuccess()) {
assert getData() != null;
buildChildDeltasForEventContext(getData(), node, event, parentDelta, nodeOffset, rm);
}
else if (getStatus().getCode() == IDsfStatusConstants.NOT_SUPPORTED) {
// The DMC for this node was not found in the event. Call the
// super-class to resort to the default behavior which will add a
// delta for every element in this node.
buildChildDeltasForAllContexts(node, event, parentDelta, nodeOffset, rm);
}
else {
super.handleCompleted();
}
}