~vcs-imports/egit/master

Viewing all changes in revision 4509.

  • Committer: Michael Keppler
  • Author(s): Thomas Wolf
  • Date: 2019-12-13 17:30:05 UTC
  • Revision ID: git-v1:b2e98cd3ae4bc45153e5424c331f3cdaa936f537
[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>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: