Define target platforms for the build

This simplifies setting up the Eclipse workspace and allows to use
Eclipse versions for development which are not matching the target
platform version. In order to set a target platform open it using the
target editor and click "Set as Target Platform". The EGit Maven build
now also is based on the same target platform definition. This way
dependencies used in the Maven build are identical to those used in
Eclipse.

This change is a prerequisite for change
Id9d721ae574a83ad9440a93ddb143b1271fc2b2b as this is using a feature of
the team framework only available in Juno. Without a target platform
definition this could not be built in older Eclipse versions.

Change-Id: I462e4a35fea4caec7ae95b08ac13cb495c0fa309
JGit-Dependency: Ifc4bfbb3efbab0f5bfbde74f0b2ddc5a2f9ee6a5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Add support for Eclipse-SourceReferences header

Add extensions required to import a plug-in using SCM URL from its
MANIFEST.MF. To give it a try, open Plug-ins view, select a plug-in,
right click and Import As > Project from a Repository.... Then follow
instructions in the wizard. Importing with a tag is not supported yet,
see bug 367712.

This allows EGit compilation against all supported eclipse platform
versions but only builds the p2 repository when built against Juno.
This should be improved in a subsequent change.

Bug: 327381
Change-Id: Ia4eb34fec24f5fe714a1b5a2b50fe0393e8d3f39
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Git API does not declare GitAPIException call() and related changes

Anyone that calls a Git API should catch GitAPIException and not just
the currently known exceptions.

During the process of cleaning this up a number of cases, but not all
cases, where only checked exceptions are thrown, are changed to
catch all Exceptions except Error.

This changes adapt EGit to changes made in JGit for this reason.

Bug: 366914
JGit-Change-Id: I50380f13fc82c22d0036f47c7859cc3a77e767c5
Change-Id: I4de4902003a9f306912475e8b15b1e72d43e7475
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Fix maven coordinates of org.eclipse.egit.import feature

Tycho 0.14 requires Maven artifactID to match bundle/feature ID.
Hence change Maven artifactID accordingly and choose a different Maven
groupID to prevent the feature's Maven artifactID to clash with the
bundle's Maven artifactID.

Change-Id: Iabbfad76893a96dd575e3d514eae03ad3831bd72
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
EGit v2.0.0.201205301645-rc2

Change-Id: I2aea187a7b545073e93a48b64321698e4e11b9b6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Prepare next 2.0.0-SNAPSHOT builds

Change-Id: I9c98269f048922d88b8faea02be9acd3d7fe3151
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[historyView] Use jface.text framework for ref tooltips

By using AbstractHoverInformationControlManager instead of bare SWT, the
following bugs are fixed:

* Tooltips block clicks in history view
* Tooltip on history view remains open when switching applications

Also, it seems to behave more than one would expect with regards to how
fast it appears and how it stays visible.

And to top it off, it's less code.

Bug: 371695
Bug: 380815
Bug: 380831
Change-Id: I671eccb2ef055bc548ce7145677ea64aaf03ac96
Signed-off-by: Robin Stocker <robin@nibor.org>
[historyView] Fix hover over Ref tags

After 5c5d942, the implementation of the hover must be adjusted,
otherwise the hover over the Ref tags (showing the full names of the
Ref) will wrongly activated when the mouse is width of first column left
of the actual tag.

This also sets the foreground color explicitly, as the current
implementation is rendered nearly unreadable on Ubuntu 12.04 (dark grey
on black).

Change-Id: Ib1d6ad50105c746e9f2918bbb1cc212c5ffcdc50
Fix wrong bundle name and vendor

Bug 381319
Change-Id: I80cc9b46a0b637f0d17a76e0a4fde04ca46473d3
Signed-off-by: Dani Megert <Daniel_Megert@ch.ibm.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Revert Jetty from 8.1.3.v20120416 to 7.6.0.v20120127

Update target platform to use the latest available Jetty 7.6.0.v20120127
release instead of Jetty 8.1.3.v20120416. We can't use Jetty 8.x since
it depends on Servlet API 3.0 which requires Java 6 but JGit still wants
to support Java 5.

JGit change I343273d994dc7b6e0287c604e5926ff77d5b585b needs this target
platform.

Change-Id: Ibf67a6d3539fa0708a3e5dbe44fb899c56fbd8ed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
[historyView] Fix tooltip position on Ref hover

With the fix in I8fe269af7a73274ee6cbca96778ba7be0754d6bb,
the positions would have been right. But because it has been
fixed by 3ee1488 in a different way, we now have to adjust the
position in this place.

Change-Id: I23c619e6eed73b8b1055218c57016e502e6dec69
Signed-off-by: Robin Stocker <robin@nibor.org>
Allow amending a published commit

Provide a message type from CommitMessageComponent so
calling classes know the severity of the message and
report amending a published commit as a warning.

A warning message is sufficient to notify the committer
that they may be rewriting published history but it
still should be allowed since there are valid cases
for amending published commits and then force pushing.

Change-Id: Ic2d4e279feb70c7f9ad45328cc369cdd981f3b96
Signed-off-by: Robin Stocker <robin@nibor.org>
Load history incrementally

Loading history incrementally can drastically reduce memory consumption
and the time needed to render the part of the history the user is
interested in. Most often only the most recent part of the history is
needed. Hence load only one batch of 256 commits initially and keep the
GenerateHistoryJob in order to incrementally load the next batch when
the user has scrolled down half of the loading batch size (128 commits).

JGit-Dependency: Id3b97d88d3b4b2d67561b11f8810cb88fe040823
Change-Id: Ibc88d589ea2a5f233cd65c203bde9187c122a277
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
[historyView] Load commit body lazily

The body of loaded objects is now thrown away in the walker after it has
parsed the information necessary to render the history graph. It is
reloaded when content of the body is needed in the HistoryView.

For large repositories this saves a lot of memory, e.g. about 110 MB for
linux kernel.

JGit-Dependency: I9291ba8c34c8744bc009b1bd302ed28bfa4e9476
Change-Id: I1504a6127e7fc2ebea67baade5e9799b256ab116
[historyView] Perform clear on background thread when disposed

An NPE can occur if SWTCommitList.clear() is called
from dispose() while fillTo() is running from
GenerateHistoryJob.

dispose() is always called on the UI-thread so schedule
a background thread that synchronizes on the instance
and calls clear since all other state accessing calls to
the SWTCommitList instance are done inside synchronized
blocks.

Change-Id: I855d5bfeb5131c634b4790e6b7231424f2be4566
[repoView] Release RevWalks used in label provider

Change-Id: Ibb5e800f7dd6915bc19d63f6bf0bf6d4143449ba
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Update to official Juno Orbit build

Use the official Orbit build released for Juno [1].

[1] http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg07655.html

Change-Id: Ife7f3f7db29d73abe9966920decca94ee24507dd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Update build to use Tycho 0.15.0

JGit-Dependency: Id4ee884027d55cd2d43e8a6ef58a67f74ab488e4
Change-Id: I5b799d2ba4b140c82e63d4cbf86111c4bd7ccff7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Fix name of zipped p2 repository

Change-Id: I92c58cbe19f9698f5a581f8749f42695d3063975
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Include about.html for org.eclipse.egit.import

Change-Id: Ifbcecaee410f5e01e8a29dbafcaf953f0d499d5c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>