mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed update problem in Debug view and expression view (bug 186041).
This commit is contained in:
parent
b5503f43ae
commit
3f0952d28b
2 changed files with 30 additions and 18 deletions
|
@ -89,7 +89,7 @@ public abstract class AbstractExpressionLayoutNode<V extends IDMData> extends Ab
|
|||
protected void getElementForExpressionPart(final IChildrenUpdate update, final String expressionPartText, final DataRequestMonitor<Object> rm) {
|
||||
updateElements(new VMElementsUpdate(
|
||||
update, -1, -1,
|
||||
new DataRequestMonitor<List<Object>>(getSession().getExecutor(), rm) {
|
||||
new DataRequestMonitor<List<Object>>(getExecutor(), rm) {
|
||||
@Override
|
||||
protected void handleOK() {
|
||||
if (getData().size() == 0) {
|
||||
|
|
|
@ -161,34 +161,46 @@ abstract public class AbstractVMProvider implements IVMProvider
|
|||
if (node.getChildLayoutNodes().length == 0) {
|
||||
for (IHasChildrenUpdate update : updates) {
|
||||
update.setHasChilren(false);
|
||||
update.done();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a matrix of element updates:
|
||||
// The first dimension "i" is the list of children updates that came from the viewer.
|
||||
// For each of these updates, there are "j" number of elment updates corresponding
|
||||
// to the number of child layout nodes in this node.
|
||||
// Each children update from the viewer is complete when all the child layout nodes
|
||||
// fill in their elements update.
|
||||
// Once the matrix is constructed, the child layout nodes are given the list of updates
|
||||
// equal to the updates requested by the viewer.
|
||||
VMHasElementsUpdate[][] elementsUpdates =
|
||||
new VMHasElementsUpdate[node.getChildLayoutNodes().length][updates.length];
|
||||
for (int i = 0; i < updates.length; i ++)
|
||||
{
|
||||
final IHasChildrenUpdate update = updates[i];
|
||||
|
||||
final MultiRequestMonitor<DataRequestMonitor<Boolean>> hasChildrenMultiRequestMon =
|
||||
new MultiRequestMonitor<DataRequestMonitor<Boolean>>(getExecutor(), null) {
|
||||
@Override
|
||||
protected void handleCompleted() {
|
||||
// Status is OK, only if all request monitors are OK.
|
||||
if (getStatus().isOK()) {
|
||||
boolean isContainer = false;
|
||||
for (DataRequestMonitor<Boolean> hasElementsDone : getRequestMonitors()) {
|
||||
isContainer |= hasElementsDone.getStatus().isOK() &&
|
||||
hasElementsDone.getData().booleanValue();
|
||||
}
|
||||
update.setHasChilren(isContainer);
|
||||
} else {
|
||||
update.setStatus(getStatus());
|
||||
}
|
||||
update.done();
|
||||
}
|
||||
};
|
||||
|
||||
for (int j = 0; j < node.getChildLayoutNodes().length; j++)
|
||||
{
|
||||
final MultiRequestMonitor<DataRequestMonitor<Boolean>> hasChildrenMultiRequestMon =
|
||||
new MultiRequestMonitor<DataRequestMonitor<Boolean>>(getExecutor(), null) {
|
||||
@Override
|
||||
protected void handleCompleted() {
|
||||
// Status is OK, only if all request monitors are OK.
|
||||
if (getStatus().isOK()) {
|
||||
boolean isContainer = false;
|
||||
for (DataRequestMonitor<Boolean> hasElementsDone : getRequestMonitors()) {
|
||||
isContainer |= hasElementsDone.getStatus().isOK() &&
|
||||
hasElementsDone.getData().booleanValue();
|
||||
}
|
||||
update.setHasChilren(isContainer);
|
||||
update.done();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
elementsUpdates[j][i] = new VMHasElementsUpdate(
|
||||
update,
|
||||
hasChildrenMultiRequestMon.add(
|
||||
|
|
Loading…
Add table
Reference in a new issue