aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnes2005-11-04 16:54:18 -0500
committerKevin Barnes2005-11-04 16:54:18 -0500
commit17e44dc565f7097994d67f37e12377f1957cb230 (patch)
treead61bdd2927bc430e95d0ba0273d0a1f4ad4f91b
parent4b31209fc8e1724262a2e2d2158e9828f1414fe7 (diff)
downloadeclipse.platform.debug-async_tree_viewer.tar.gz
eclipse.platform.debug-async_tree_viewer.tar.xz
eclipse.platform.debug-async_tree_viewer.zip
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultUpdatePolicy.java33
1 files changed, 18 insertions, 15 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultUpdatePolicy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultUpdatePolicy.java
index 1204a3a27..f087d9d8d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultUpdatePolicy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultUpdatePolicy.java
@@ -66,21 +66,24 @@ public class DefaultUpdatePolicy extends AbstractUpdatePolicy implements IModelC
private void handleChange(IModelDeltaNode node) {
int flags = node.getFlags();
- if ((flags & IModelDelta.STATE) != 0) {
- getViewer().update(node.getElement());
- }
- if ((flags & IModelDelta.CONTENT) != 0) {
- getViewer().refresh(node.getElement());
- }
- if ((flags & IModelDelta.SELECT) != 0) {
- getViewer().update(node.getElement());
- TreePath treePath = getTreePath(node);
- ((AsynchronousTreeViewer) getViewer()).setSelection(new TreeSelection(treePath));
- }
- if ((flags & IModelDelta.EXPAND) != 0) {
- getViewer().update(node.getElement());
- TreePath treePath = getTreePath(node);
- ((AsynchronousTreeViewer) getViewer()).expand(new TreeSelection(treePath));
+ AsynchronousViewer viewer = getViewer();
+ if (viewer != null) {
+ if ((flags & IModelDelta.STATE) != 0) {
+ viewer.update(node.getElement());
+ }
+ if ((flags & IModelDelta.CONTENT) != 0) {
+ viewer.refresh(node.getElement());
+ }
+ if ((flags & IModelDelta.SELECT) != 0) {
+ viewer.update(node.getElement());
+ TreePath treePath = getTreePath(node);
+ ((AsynchronousTreeViewer) getViewer()).setSelection(new TreeSelection(treePath));
+ }
+ if ((flags & IModelDelta.EXPAND) != 0) {
+ viewer.update(node.getElement());
+ TreePath treePath = getTreePath(node);
+ ((AsynchronousTreeViewer) getViewer()).expand(new TreeSelection(treePath));
+ }
}
}