Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2019-12-03 21:17:35 +0000
committerMichael Keppler2019-12-13 17:30:05 +0000
commitb2e98cd3ae4bc45153e5424c331f3cdaa936f537 (patch)
treecaf5e39d82d3595e1024d1cac0c6241884852da5 /org.eclipse.egit.ui.test
parentac9e00bebef50c2b7682cd349e7e92ff3ef0efd3 (diff)
downloadegit-b2e98cd3ae4bc45153e5424c331f3cdaa936f537.tar.gz
egit-b2e98cd3ae4bc45153e5424c331f3cdaa936f537.tar.xz
egit-b2e98cd3ae4bc45153e5424c331f3cdaa936f537.zip
[repo view] Simpler refresh, better decorator setup, simpler listeners
Instead of a scheduling a job that schedules a UI refresh simply schedule the UI refresh directly. Reduce the default delay a little. Also, there is no need to use a new input. Refreshing the viewer will pick up structural changes. The lightweight decorator was setup in a somewhat non-standard way not really supported by the CNF. Use a simple non-decorating label provider in the view, and let the framework do all the decorating. This has multiple advantages: there's no flickering on refreshes. Icon decorations can finally be done in the lightweight decorator. This also brings back the gitflow icon overlay. And there's no longer a need for caching "last used" labels to avoid flickering in text decorations. However, out of the box the framework does not support having label text after the decoration. Add special-case handling for updating a ViewerCell and add the directories of repositories and working trees only then. If this were done in getStyledText() of the label provider, the directories would appear before the decoration. Note that both the simpler refresh and the lightweight decorator setup belong together. Doing only one or the other leads to flickering on refresh. Use lambdas for listeners. Bug: 553841 Change-Id: I735da30934c650680d60781ae58f7f354089d7d0 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java
index 5190cf918b..9e95b5207e 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTestUtils.java
@@ -44,7 +44,7 @@ public class GitRepositoriesViewTestUtils {
@Override
public void run() {
- providerRef.set(new RepositoryTreeNodeLabelProvider());
+ providerRef.set(new RepositoryTreeNodeLabelProvider(true));
}
});

Back to the top