|
Lines 73-80
Link Here
|
| 73 |
IContentProvider contentProvider = getContentProvider(); |
73 |
IContentProvider contentProvider = getContentProvider(); |
| 74 |
// If we are building lazily then request lookup now |
74 |
// If we are building lazily then request lookup now |
| 75 |
if (contentProvider instanceof ILazyContentProvider) { |
75 |
if (contentProvider instanceof ILazyContentProvider) { |
| 76 |
((ILazyContentProvider) contentProvider) |
76 |
boolean oldBusy = busy; |
| 77 |
.updateElement(index); |
77 |
busy = false; |
|
|
78 |
try { |
| 79 |
((ILazyContentProvider) contentProvider) |
| 80 |
.updateElement(index); |
| 81 |
} finally { |
| 82 |
busy = oldBusy; |
| 83 |
} |
| 78 |
return; |
84 |
return; |
| 79 |
} |
85 |
} |
| 80 |
} |
86 |
} |
|
Lines 468-484
Link Here
|
| 468 |
List result = new ArrayList(); |
474 |
List result = new ArrayList(); |
| 469 |
int[] selectionIndices = doGetSelectionIndices(); |
475 |
int[] selectionIndices = doGetSelectionIndices(); |
| 470 |
if (getContentProvider() instanceof ILazyContentProvider) { |
476 |
if (getContentProvider() instanceof ILazyContentProvider) { |
| 471 |
ILazyContentProvider lazy = (ILazyContentProvider) getContentProvider(); |
477 |
boolean oldBusy = busy; |
| 472 |
for (int i = 0; i < selectionIndices.length; i++) { |
478 |
busy = false; |
| 473 |
int selectionIndex = selectionIndices[i]; |
479 |
try { |
| 474 |
lazy.updateElement(selectionIndex);// Start the update |
480 |
ILazyContentProvider lazy = (ILazyContentProvider) getContentProvider(); |
| 475 |
Object element = doGetItem(selectionIndex).getData(); |
481 |
for (int i = 0; i < selectionIndices.length; i++) { |
| 476 |
// Only add the element if it got updated. |
482 |
int selectionIndex = selectionIndices[i]; |
| 477 |
// If this is done deferred the selection will |
483 |
lazy.updateElement(selectionIndex);// Start the update |
| 478 |
// be incomplete until selection is finished. |
484 |
Object element = doGetItem(selectionIndex).getData(); |
| 479 |
if (element != null) { |
485 |
// Only add the element if it got updated. |
| 480 |
result.add(element); |
486 |
// If this is done deferred the selection will |
|
|
487 |
// be incomplete until selection is finished. |
| 488 |
if (element != null) { |
| 489 |
result.add(element); |
| 490 |
} |
| 481 |
} |
491 |
} |
|
|
492 |
} finally { |
| 493 |
busy = oldBusy; |
| 482 |
} |
494 |
} |
| 483 |
} else { |
495 |
} else { |
| 484 |
for (int i = 0; i < selectionIndices.length; i++) { |
496 |
for (int i = 0; i < selectionIndices.length; i++) { |
|
Lines 609-626
Link Here
|
| 609 |
* boolean) |
621 |
* boolean) |
| 610 |
*/ |
622 |
*/ |
| 611 |
protected void internalRefresh(Object element, boolean updateLabels) { |
623 |
protected void internalRefresh(Object element, boolean updateLabels) { |
| 612 |
applyEditorValue(); |
624 |
if (isBusy()) |
| 613 |
if (element == null || equals(element, getRoot())) { |
625 |
return; |
| 614 |
if (virtualManager == null) { |
626 |
busy = true; |
| 615 |
internalRefreshAll(updateLabels); |
627 |
try { |
|
|
628 |
applyEditorValue(); |
| 629 |
if (element == null || equals(element, getRoot())) { |
| 630 |
if (virtualManager == null) { |
| 631 |
internalRefreshAll(updateLabels); |
| 632 |
} else { |
| 633 |
internalVirtualRefreshAll(); |
| 634 |
} |
| 616 |
} else { |
635 |
} else { |
| 617 |
internalVirtualRefreshAll(); |
636 |
Widget w = findItem(element); |
| 618 |
} |
637 |
if (w != null) { |
| 619 |
} else { |
638 |
updateItem(w, element); |
| 620 |
Widget w = findItem(element); |
639 |
} |
| 621 |
if (w != null) { |
|
|
| 622 |
updateItem(w, element); |
| 623 |
} |
640 |
} |
|
|
641 |
} finally { |
| 642 |
busy = false; |
| 624 |
} |
643 |
} |
| 625 |
} |
644 |
} |
| 626 |
|
645 |
|