Branch name normalization: use content assist
commit40bd548b6a1de6b95c5b4ba3e26d1bfee4226f85
authorThomas Wolf <thomas.wolf@paranor.ch>
Tue, 21 Feb 2017 22:14:08 +0000 (21 23:14 +0100)
committerThomas Wolf <thomas.wolf@paranor.ch>
Tue, 21 Feb 2017 23:31:15 +0000 (22 00:31 +0100)
treebaf836b08f2ddd0724ee92a5d7ad3c2f7b765633
parentcb759871376c577699cccecb53ee38c846b242cf
Branch name normalization: use content assist

Rewrite the new branch name normalization to not interfere with the
user's typing. Instead just replace blanks by underscores. Use the
content assist framework to suggest an auto-corrected branch name if
the current input does not form a valid branch name. Show content
assist availability via the normal lightbulb decorator.

This content-assist can be triggered via the normal keystroke. On
characters that are known to be rejected by JGit in any case, it is
also triggered automatically. If the current input _does_ form a
valid branch name, content assist is disabled and the lightbulb is
hidden.

This gives the user full control over the input, but provides easily
accessible auto-correction suggestions.

Change-Id: I7d5b3a422823b58c6f91ff13898cfb1fb154b015
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewBranchHandlingTest.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchNormalizerModifyListener.java [deleted file]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/BranchNameNormalizer.java [new file with mode: 0644]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/BranchRenameDialog.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/CreateBranchPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties