Enable Create Patch for first commit in the history view

Change-Id: Ibea61c875a3eafae624b0ec13cfb9d9b1f8e4e19
[stagingView] Sort content by name if file names are shown first

Bug: 440967
Change-Id: Ib0ca1b0c9f8ba9f83d62aa85eaaf4ee329c407fb
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Fix getSelectedResources not using all ResourceTraversals

It only used the resources of the first traversal before. E.g. a working
set has multiple traversals. I don't know if this bug was affecting
anything else.

Change-Id: I19df313931d1d94fe291cbc0bc9dee73f50381db
Signed-off-by: Robin Stocker <robin@nibor.org>
Add "Commit..." to Team context menu of working sets

The fix from I19df313931d1d94fe291cbc0bc9dee73f50381db is required so
that the resources from the projects in the working set are preselected.

Bug: 311299
Change-Id: Ie4247b5a02a7a67b03ec4f16bc079c0557ffd931
Signed-off-by: Robin Stocker <robin@nibor.org>
Merge "Enable Create Patch for first commit in the history view"
Clean up titles used in compare views

Some were showing the 40 character hash, some were showing "1a2b3c4...".
Change it to show just "1a2b3c4" as in other places. The title isn't a
good place to show the full hash because there's no way to copy it.

Also remove unnecessary "'" around hashes, it's just noise.

Change-Id: Ib72da793b00c587af0ebaf9ac6c4cd925aa74764
Signed-off-by: Robin Stocker <robin@nibor.org>
When "Commit and Push" opens a wizard, use simple push wizard

When there is no upstream or default push config, a wizard is shown.
Before this change, the advanced wizard was used.

Bug: 441231
Change-Id: I9bea327a477069213bbc7fb41f270a96fa1f6e56
Signed-off-by: Mickael Istria <mistria@redhat.com>
Signed-off-by: Robin Stocker <robin@nibor.org>
[historyView] Support searching for branches/tags with find toolbar

Add a new search option to the history view search toolbar that allows
to search for branches and tags. Also include it in the "All" option.

Bug: 324737
Change-Id: Ia2627c25e479b17ba03bce4bb470972bebd549cd
Signed-off-by: Andreas Hermann <a.v.hermann@gmail.com>
Signed-off-by: Robin Stocker <robin@nibor.org>
Don't use alternating row colors for staging areas

To be consistent with other similar file viewers in Eclipse we should
avoid using alternate colors for simple file lists - they only add
visual noise. See also https://git.eclipse.org/r/#/c/31804/ removing
alternating row colors for commit file diff viewer.

Change-Id: Ida5aaef0d3338433a1c1690bed005275a75b382f
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Fix error due to overlapping StyleRanges in CommitMessageViewer

This was caused by using setStyleRanges in
I2cf1e67e23f8d32a5a88b45ea5839f51b90c853a. With the individual
setStyleRange method, overlapping was handled by StyledText.

By using setStyleRanges for the format job results first (which are
ordered and non-overlapping), we still get the better performance of
setting these in bulk. The hyperlink style ranges are then applied on
top to handle overlapping, but they should be much fewer in numbers.

Bug: 440834
Change-Id: I64e1ea37fb409ce21d7ee7fcec8dae01ddec6b7a
Signed-off-by: Robin Stocker <robin@nibor.org>
[historyView] Context menu item for deleting tags

The entry in the context menu triggers a function with the same features
as with the deletion of branches.
If there are multiple tags on the selected commit a dialog is shown
where the user can selected the exact tags to be deleted.

Bug: 441800
Change-Id: I5a9df7b52f0789e04242faf1833484c19494c88a
Signed-off-by: Andreas Hermann <a.v.hermann@gmail.com>
Signed-off-by: Robin Stocker <robin@nibor.org>
Interactive rebase view toolbar can incorrectly activate buttons

Currently interactive rebase view plan toolbar can incorrectly handle
changeset table selection changes in case of multiple selected
changesets.
RebaseInteractiveStepActionToolBarProvider#mapActionItemsToSelection
activates corresponding button on the toolbar in case of single
selection and can deactivate all buttons in case on multi selection (if
selected changesets have different rebasing plans). Current
implementation does not handle situation in which another button needs
to be activated. For example, if previously selected changeset had
"reword" plan ("reword" button activated) and new selection is two
changesets with "fixup" plan then expected behaviour is to activate
"fixup" button, but actually "reword" button will remain activated. 

Proposed implementation always activates button corresponding to the
first selected changeset plan and deactivates this button if necessary
(i.e. selected changesets have different plans).

Bug: 441891
Change-Id: Ic6013d2857e8dfc439650692e2ee22031e6f61ec
Signed-off-by: Vadim Dmitriev <dmgloss@mail.ru>
Interactive rebase view context menu for plan modification

Changeset table on the interactive rebase view now has context menu to
set rebasing plan for the selected rows.

Bug: 441891
Change-Id: I38448abbfd8d104b281aaf69cdf06702a41c3836
Signed-off-by: Vadim Dmitriev <dmgloss@mail.ru>
Fix repeating message 'Building workspace' in status bar

In Ibdc454f5ffb290831b81c5e775da35434811454c, many jobs were converted
from normal Job to WorkspaceJob.

In case of RepositoryChangeScanner which is run every few seconds, this
causes the message "Building workspace" to flash in the status bar. The 
reason for this is that a WorkspaceJob triggers an auto-build, even when 
no resources were changed.

As RepositoryChangeScanner does not change any resources itself, it
doesn't need to be a WorkspaceJob (which is for batching resource
changed 
events). So change it back to a normal Job.

Bug: 439325
Change-Id: Ic555b868fbda952e7f88a1b851e63af2bb1d6545
Signed-off-by: Szymon Ptaszkiewicz <szymon.ptaszkiewicz@pl.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change "... Git Index" to be consistently "... Index" in actions

See http://stackoverflow.com/q/24677225/305973 for the user confusion
the previous situation caused. Using "Index" without Git is consistent
with the other action names, which are e.g. "HEAD Revision".

Change-Id: I00325b7cebfe3ef1914661f547ad755809f080a2
Signed-off-by: Robin Stocker <robin@nibor.org>
Fix IAE in Gerrit configuration page on null scheme

URIish#getScheme can return null, handle it.

Change-Id: If2cc15049b449f490f67332b914a271075134847
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Add missing mnemonics to menu items

Change-Id: Ic04734588eddd557d842b58a4b7a3ace18615bd7
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Don't use alternating row colors for file diff viewer

Alternating row colors are useful for tables with more than one column,
so that it's easier to see which cells belong together. But the commit
file diff viewer table only has one column.

Looking at other such tables in Eclipse, I couldn't find any that uses
alternating row colors.

Also, it makes it harder to see which files are greyed out
(non-interesting ones), see bug 440979.

Change-Id: I50b7c8c66cf391cf5c08b2a29e6bfd14896f17f6
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Commit dialog: Replace help button with link to Staging view

The help that comes up is not about the commit dialog, so showing it
only confuses users.

Instead, we can use the space to show a link to open the Staging view,
to inform the user about the alternative way of committing.

Bug: 441795
Change-Id: I616430bc9d0484b17940d679ad9ad14e277ccd7d
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[repoView] Sort tags in natural order

Tags containing numbers are now sorted in natural order. 
In such an order the tag "v1.2" is before the tag "v1.12" instead of the
other way round as with ASCII order.

Bug: 442238
Change-Id: I367ff6f98740abe20396a33742e93b5e06f92d6b
Signed-off-by: Andreas Hermann <a.v.hermann@gmail.com>