Use correct syntax when a single ref was updated

Bug: 360653
Change-Id: I87ad76e9f1b22d2ae286c6243f403d368daa1940
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
Fix wrong NLS key

Bug: 360653
Change-Id: I6c6646ed4f630aa2af7850ad63cd4f269c88d785
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
IndexDiffCacheEntry: wait for workspace lock using begin/end rule

IndexDiffCacheEntry.waitForWorkspaceLock is used to synchronize
IndexDiff calculations with workspace changes. IndexDiff calculation is
started when the workspace can be locked.

The old implementation performed an empty Workspace.run to achieve this.
This could result in the state that Workspace.run acquires scheduling
rule workspace root and waits for OrderedLock because another thread is
broadcasting changes.

To avoid this blocking of workspace root waitForWorkspaceLock now avoids
calling Workspace.run. Instead JobManager().beginRule is used to wait.

Bug: 361758
Change-Id: I611f70c934aefe5993927fa2675325ba11dd5373
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Enforce the use of Java5 API:s only (with a few exceptions)

This only works with Eclipse 3.6 and newer and requires installation
of new package. Documentation is not very good, but there is a blog
about it here: http://eclipseandjazz.blogspot.com/2011/10/of-invalid-references-to-system.html

API checking is especially useful on OS X where Java5 is not readily
available.

Change-Id: I574e8c8b2e1b4cad2675b482268cdc98b35da38a
Use refs cache for tags as well

Not using the cache leads to serious performance issues in repos with
many tags.

Bug: 360658
Change-Id: I335c76af311bcd8fbd2e83fc050ce522a3e71437
Signed-off-by: Markus Keller <markus_keller@ch.ibm.com>
Signed-off-by: Robin Stocker <robin@nibor.org>
NPE in SpellcheckableMessageArea$1.widgetDisposed when closing Eclipse

Allow to use a local service locator for retrieving IHandlerService.
Use the workbench window's service locator if the local is not available
e.g. in a dialog.

Bug: 381052
Change-Id: Ie953df8983bf0fd28496feb886ca4e1ae7201b9f
Signed-off-by: Robin Stocker <robin@nibor.org>
[stagingView] Only offer actions applicable for all items

The action is run on all selected staging entries. So the available
actions for the whole selection should be the intersection of the
available actions of each entry.

This is a preconditions for the next change which will introduce a
Delete action, which should only be offered if all selected entries can
be deleted.

Bug: 384609
Change-Id: Ic0941b07f30af0c62ebc4860bf993ea51fa8c046
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[stagingView] Add Delete action for untracked files

If the selection only includes workspace resources, the normal
DeleteResourceAction is used. Because of this, the delete can even be
undone. This change also makes the undo and redo menu items available
when the staging view is focused for this to be discoverable.

If the selection includes a non-workspace resource, the action is
carried out by a new DeleteResourcesOperation, which can handle
non-workspace resources. This has no undo support though.

The new operation can later also be used for offering Delete for Working
Directory files in the Repositories view.

Bug: 384609
Change-Id: I38f68d19877a2be495fbc5da30b17503fbf0dd86
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[findBugs] Use Integer.valueOf instead of new Integer

Change-Id: I8b5330fb540eab61c66cc55c64f0158559e4314e
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[findBugs] Use FileUtils.createNewFile to check return value

Change-Id: Id0472d11656fd7eb42f5add49aabe9c3cc3b8a97
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[findBugs] Make inner class static

Change-Id: I3df5e257df959f03a73edf4f8a1219bc94ea8a7e
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[findBugs] Add FALL-THROUGH comment to switch case

Change-Id: Idc7e2c69ef08ef9f62aa6bcd612fa147385bac57
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[findBugs] Make variables set in @Before non-static

Change-Id: I866eaa13b0d1a74be6ec8ef873ef864fcee0b032
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Remove duplicate key 'OpenInCommitViewerCommand.name'

Change-Id: I44d756fb7b99757f7da1ffe5c2d3827e11e1deb2
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
Rename "EGit Import Support" feature to avoid confusion

The old name is pretty generic and confuses people, resulting in "EGit
cannot be installed" questions on Bugzilla, Stackoverflow and to me
personally. They were checking all EGit features and were confused when
the installation did not complete, e.g. on Eclipse 3.7.

With the more specific name and an extended description, it should be
clear that this is an optional feature that is only needed by plugin
developers.

Change-Id: Ie7a137f202dba07e252fc4e587a0f78e66a1b5f7
Signed-off-by: Robin Stocker <robin@nibor.org>
Don't reveal selection on refresh

The selection must not be revealed when the viewer gets refreshed. This
is distracting in the UI and also not necessary, because refresh(...)
and setInput(...) already have code to preserve the selection.

Bug: 384986
Change-Id: Ic5e458222469d25e0ad0710c34937c4c1937b3b3
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
Signed-off-by: Robin Stocker <robin@nibor.org>
Prevent unnecessary activation of other bundles during EGit start

The preference initializer must avoid to use/reference heavy-weight
types as this can cause other bundles to be activated.

Change-Id: I08c21ed05d0ddbaff8aa159885c790ffbb8d8b46
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>