Add compare mode to CompareTreeView

New CompareTreeView toolbar preference that allows the user to
optionally double-click on a file of the view to open it in the editor.

Default is for that preference to be true, to keep previous behavior by
default.

Change-Id: I0db641098b033849afd05f0e9e61c433bd32f945
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Interactive Rebase View: Double click opens Commit Viewer

Bug: 431451
Change-Id: I42c48a88116dce3e904d9a1659100e11feb2f9c6
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Commit Viewer: Show first line of commit message in editor tooltip

The commit message should be easier to recognize than the SHA-1 hash of
the commit.

Change-Id: Ice105d9c24851832bb2b05a15a3c2b62951bc9ae
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Accelerate calculation of content of CompareTreeView.

Do not fetch the IFile for resources that are equal.  This dramatically
accelerates the availability of the result.

Bug: 431610
Change-Id: I6852c1d9e80bdae613e86a1a358b1a2937592f1c
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Create Patch wizard: Improve labels for format combo

"Format: None" is a confusing default choice.

"Header format: None" would be a bit better, but in fact the formats are
not only about the header, but also how paths are printed. For example,
"Eclipse workspace" uses project-relative paths.

Change-Id: I6ae67e19ed08fa2988791b6fd21311aaa12e69ab
Signed-off-by: Robin Stocker <robin@nibor.org>
Only sample the progress when computing the compare tree view

Updating the progressm monitor is very slow, especially considerig the
speed at which JGit operates.

Bug: 431610
Change-Id: I321c8ec405141f631a4bcd45c7908ebff65ce2ba
Update Software User Agreement

Bug: 431255
Change-Id: I825351e4379f8b1af42b406372c177e1d98a56ff
Use correct syntax for auto ignoring directories

Ignore patterns for ignoring directories should end with a trailing
slash.

Bug: 410872
Change-Id: Ie9cef9d0ee875540af15130f2ca72e5b5163bd2c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Merge branch 'stable-3.3'

* stable-3.3:
  Use correct syntax for auto ignoring directories

Change-Id: I7b549ae97a6a359b33ec8789c16e23f5f1159b7f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
EGit v3.3.2.201404171909-r

Change-Id: I4b4c08346dd6c06d379ffdfc4086bdc28224ebc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Replace "can not" by "cannot" everywhere

In English, there seems to be a subtle difference in the meaning of "can
not" and "cannot", where "cannot" indicates an absolute impossibility,
while "can not <verb>" implies the possibility of actively chosing not
to do <verb>. In EGit we therefore always want to use the "cannot"
variant in all comments and user interface texts.

Change-Id: Ica5a7bb1cf5f0b94245a4ef9434d1b5b6a013ee0
Signed-off-by: Michael Keppler <michael.keppler@gmx.de>
Signed-off-by: Robin Stocker <robin@nibor.org>
Merge branch 'stable-3.3'

* stable-3.3:
  EGit v3.3.2.201404171909-r

Change-Id: Ia5aefafbc2f108c8be7edc9878aa9ac620505fca
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[historyView] Get selection from ExecutionEvent instead of active part

Instead of getting the selection from the currently active part, get it
from the event. This is more reliable, as the active part can change.

This change also adds getSelectedCommitId and getSelectedCommit methods
to the base class for convenience.

Bug: 432751
Change-Id: Ida69c252df5a1e3176bba3f3398cd9fcb8864b05
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Focus the first control in "Delete repository" dialog

When using the keyboard to delete a repository, it is unclear where the
input will go as there is no visible focus in the "Delete repository"
dialog.

Change-Id: I6011ef0c3b9ae83718b501afa4116341ccfc66d7
Signed-off-by: Michael Keppler <michael.keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Don't look for .git in subdirectories of project

Connecting a project with a .git repository in one of its subdirectories
breaks the Team menu for the project and makes the subdirectory
disappear. When this happens with "auto share", it's very confusing.

Other places in the code could also not really handle this, e.g. the
share wizard displayed the repository location as ".git", when it really
should have shown "sub/dir/.git".

Bug: 421573
Change-Id: I4489cdd3526a30b1d2d575040792897a92da0c6d
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[stagingView] Don't clear restored commit message state in the UI

When viewing a repository in the Staging View for the first time after
starting Eclipse, the IndexDiff data for this repository is usually not
available yet. During StagingView.reload(), first the stored Staging
View state is restored. Then enableCommitWidgets(false) is called,
which disables everything, and worse, also clears the just restored
inputs, including the commit message.

When the IndexDiff for the repository becomes available, reload() will
be called again.
This change postpones restoring the view state to that time. This way
the restored commit (and amend etc.) state remains intact. With the
IndexDiff available, the inputs will not be cleared after restoring them
(unless there are conflicts to be resolved).

This change prepares for commit message restore after restarting
Eclipse.

Change-Id: I4fb24196bf07d4af9fa18b2a8390793e2057f6eb
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Enable creating a new git repository in a non-empty folder

Bug: 323976
Change-Id: Ib5130764016cdaecefbbc25a7e0ec237af840a29
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Michael Keppler <michael.keppler@gmx.de>
Remove "job" from job name

Job names are user visible text. They should not contain "job", as that
is just the technical implementation term.

Change-Id: I1632439071a46e06f82161d32fb738083f3105c9
Signed-off-by: Michael Keppler <michael.keppler@gmx.de>
Pull with rebase: show dialog if there are uncommitted changes

This is already implemented for rebase.

In case of a pull from multiple repositories there are now several
dialogs in case of uncommitted changes. This could be improved.

Bug: 425169
Change-Id: Ibcac373f942b22f6b4ed1ac2fcd7c0a2054d5224
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Also-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Warn when switching branches and a launch is running for the repo

On certain cumbersome platforms (looking at you, Windows), a branch
switch may fail when something is running that uses the files. In case
of launch configurations inside Eclipse, we can detect that and warn the
user about it.

We could even offer to terminate it, but as termination may be async, we
just offer continue/cancel. The user can also choose to not show any
warnings again.

The code for detecting this searches the ISourceContainer of the
launches to see if one is for a project of the repository. This works
e.g. for "Java Application" run configurations and also for servers
(WST). I first tried ILaunchConfiguration#getMappedResources, but it
does not return anything for servers. Maybe there is an easier way, but
I couldn't find it.

See bug for how to test this with servers.

Bug: 419296
Change-Id: I2fd7459b0cf342c13dda087745bd68dc1b6da4c3
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>