CommitEditor: fix check-out button display
commit5ad9f043e8769694484c044e92d642912afabee0
authorThomas Wolf <thomas.wolf@paranor.ch>
Mon, 15 May 2017 17:20:21 +0000 (15 19:20 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Thu, 18 May 2017 07:52:52 +0000 (18 09:52 +0200)
tree536c98d7c12ffc1ae418984f3aa1593ab1b435d6
parentb1ab6ef36de0f591ad9c861bffd7aa461f566a14
CommitEditor: fix check-out button display

The button would show disabled when the editor was not active. That's
correct. But when clicked, editor activation would occur first, and
then the command was executed. The net user-visible effect was that
we had a "disabled" button in the UI that was armed and would perform
a command all the same.

That's not good. Resolve similar to the PDE ManifestEditor's launch
bar actions: show them always as enabled. This is achieved by not
contributing the commands directly to the toolbar but using an
intermediary action.

Also use only the current selection in the handler's activation
expression.

Bug: 516679
Change-Id: Ibce2adbae1d6bf70009c1b9fabbd285d2f21f4bb
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/plugin.xml
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditor.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties