[repoView] Add support for dropping a stashed commit

Introduces a new menu option for stashed commits
shown in the Git Repositories view that prompts to
delete the selected stashed commit.

Change-Id: Ic217e11212213840490337852db3af4cea168ee8
Remove configuration of files area viewer layout

This corrects a regression where the commit editor no
longer opened now that the layout hierarchy has changed
for the file diff viewer and the special handling that
CommitEditorPage was doing is no longer needed and
can be removed.

Bug: 375514
Change-Id: I26ec449c6487638b7452dbbe78e3886cc364e90f
[historyView] Use file viewer control when updating sash form

The file viewer is no longer wrapped in an extra layout and
so the sash form used at the bottom of the history view should
no longer use the parent control when setting the maximized
control.

This corrects an issue where the files in the selected commit
did not display in the history view when showing only the files
and not the files and comments both.

Change-Id: I7bd71231ebd249be8ab752bc2733a23e46b257f0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Reset config model when refreshing tree viewer

Clear the parsed sections when triggering a refresh of
the tree view so the latest values from the config model
are displayed properly in the tree.

Change-Id: I3dfd9140ec9fd539a41788b0d0c1c8d395afe112
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Remove unused synchronization parts

Now when custom synchronization configuration is handled by synchronize
wizard deprecated synchronize dialog can be removed. Also all its
dependencies are removed.

Also fixes SynchronizeCommand job name.

Change-Id: I3c41836b68c6e5924a9708158d3c21578db8e536
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[sync] New 'Git Commit Model' implementation

New less memory consuming implementation of 'Git Commit Model'. It uses
cache providers added earlier for retrieving data from repository
instead of calculating changes in every model object.

This is only beginning of rewriting 'Git Commit Model'. Next commits
will ensure that cache objects are created only once and completely
destroyed after synchronization.

Change-Id: I6a5b9c05bc210ebf3627fa24745f7d3d48a74e06
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[historyView] Update colors used to draw commit labels

Update the colors and appearance of labels drawn that show
which refs are currently at which commits.

  * Reduce border width to 1 pixel
  * Draw 1 pixel white insets
  * Draw annotated tags as orange and other tags as yellow

Change-Id: Ie78043cb49a1cc1ca0937a047f708df480195315
Allow push of single Refs/Commits from Repo & History Views

This adds a new SimplePushWizard which just allows selecting a target
remote and ref name. It then pushes out the selected Ref/Commit to the
selected target ref.

While implementing this I split out the Ref content assist functionality
from the existing RefSpecDialog to be reusable by this code.

Bug: 341076
Bug: 356314
Bug: 337747
CQ: 6347
Change-Id: If3be09886c23b031489116d448cae2dce29e281a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[sync] Dispose resources used by 'Git Commit' model

Dispose all nested objects in collection 'Git Commit' model. This should
make things easier for garbage collector since all circular
dependencies should be cleaned.

Also prevent creating new instance of
GitResourceVariantTreeSubscriber when
GitRepositoryProviderType.getSubscriber() method is called.

Change-Id: Ie77ea8d9faa2d69c443cd07cf49e0f3be6b3a199
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Fix potential NPE in RepositoryActionHandler

NullPointerException when user clicks on '<working tree>' node in
Synchronize view using Git Commit model

Change-Id: I461956b05217ed22f3ffe70f8c4adcd9773cfc29
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Staging View: allow discarding changes on non-workspace files

It is now possible to discard a change on a non-workspace file in the
"Unstaged Changes" table. The "Replace with File in Git Index" action is
now available on the following files:
1. Deleted/modified files in closed projects
2. Deleted/modified non-workspace files

Bug: 351341
Change-Id: Id6af4f71dbda5d080d96a387365831688a4984a8
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Staging View: provide replace with HEAD action

This change provides the action "Replace with HEAD" for both workspace
and non-workspace files.

Change-Id: I169e3ca87edb314c6ed6d6b10a68a5a08794fa1f
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Staging View: refresh button now also refreshes resources

The refresh action in Staging View now refreshes the resources in the
projects related to the git repository. This is done before calculating
a new IndexDiff to ensure that ContainerTreeIterator is using up-to-date
resources.

Change-Id: I9eb90b494572a0edbce12f9796a9fcf06519030a
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
SimplePushSpecPage: isEmpty() is undefined for the type String in Java 5

Change-Id: I8ca1437882864fe344deed0602ef13162ec98bfe
IndexDiff Cache: fix cancellation issue

It was not possible to cancel the "Re-indexing repository" job while
this job was waiting for the workspace lock.

Bug: 373077
Change-Id: Iade4dc9fa1445536e7a2a78ef0f22e82e2a331e2
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Merge "IndexDiff Cache: fix cancellation issue"
Close Synchronize View after each synchronize test

We frequently observe failing synchronize tests timing out when looking
for some widget, typically re-running the failed test separately without
repeating all the tests in the test suite succeeds. Closing the
synchronize view between tests seems to reduce the chance of
interferences between synchronize tests when they are all run in one
test run.

Change-Id: I107b6d06b307d238195f1a6f429bca7fd075a010
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Fix diff icons and left/right sides in History View compare

When comparing two commits via "Compare with Each Other" in History
View, there were two problems:

1. For CHANGE cases, the commit ID label and the actual content of the
   sides did not match. This is fixed by always showing compareRev on
   the left, consistent with setLeftLabel and setRightLabel earlier in
   the code.

2. For ADDITION/DELETION cases, the icon shown in the tree was reversed.
   For an addition (file doesn't exist in base/right, exists in
   compare/left), a [-] was shown (weird). By ORing it with
   Differencer.RIGHT, we get a nice left to right arrow with a +/- in it
   (which is then correct).

Bug: 350623
Change-Id: I11bfbdfd48dd3d40689f1c4db030a207d570410b
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Merge "Close Synchronize View after each synchronize test"
Add setting for streamFileThreshold in the UI.

This was the only missing setting from WindowCacheConfig.

Change-Id: I73e72d8b35e448f01aa226b9eb5c157220a4cda5