Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-06-10 17:16:47 +0000
committerMichael Valenta2004-06-10 17:16:47 +0000
commit4c0b0bb6ea8d00d2f95f0debf0a3e0950513af06 (patch)
tree4725e407195ce6fbd1c2220f04d6befad639d203
parentf0c5bed2c4d8e6ff787f3ec1f9e0ce6828b91375 (diff)
downloadeclipse.platform.team-4c0b0bb6ea8d00d2f95f0debf0a3e0950513af06.tar.gz
eclipse.platform.team-4c0b0bb6ea8d00d2f95f0debf0a3e0950513af06.tar.xz
eclipse.platform.team-4c0b0bb6ea8d00d2f95f0debf0a3e0950513af06.zip
Bug 65793 Marker propogation results in delay switching modes
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
index 13485f34f..7af342d79 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
@@ -621,20 +621,23 @@ public abstract class SynchronizeModelProvider implements ISyncInfoSetChangeList
}
/**
- * Forces the viewer to update the labels for parents whose children have
- * changed during this round of sync set changes.
+ * Forces the viewer to update the labels for queued elemens
+ * whose label has changed during this round of changes. This method
+ * should only be invoked in the UI thread.
*/
protected void firePendingLabelUpdates() {
+ if (!canUpdateViewer()) return;
try {
- if (canUpdateViewer()) {
- StructuredViewer tree = getViewer();
- tree.update(pendingLabelUpdates.toArray(new Object[pendingLabelUpdates.size()]), null);
- }
+ Object[] updates = pendingLabelUpdates.toArray(new Object[pendingLabelUpdates.size()]);
+ updateLabels(updates);
} finally {
pendingLabelUpdates.clear();
}
}
+ /*
+ * Forces the viewer to update the labels for the given elements
+ */
private void updateLabels(Object[] elements) {
if (canUpdateViewer()) {
StructuredViewer tree = getViewer();
@@ -799,7 +802,7 @@ public abstract class SynchronizeModelProvider implements ISyncInfoSetChangeList
// Fire label changed
asyncExec(new Runnable() {
public void run() {
- updateLabels(changes);
+ firePendingLabelUpdates();
}
});
return Status.OK_STATUS;

Back to the top