Eclipse's version control system of choice (and indeed, of many sane people's choice) is Git, the canonical distributed version control system for open-source projects. The EGit implementation in Eclipse is bundled by default for almost all of the standard packages, although it doesn't exist in the SDK package. The git
command-line client is available for most operating systems and can be downloaded from http://git-scm.com.
git
. Install the Eclipse Git Team Provider from the Collaboration group:org.eclipse.swt
projects were imported from a source snapshot in the previous section, they need to be deleted before they can be cloned. Right-click on the org.eclipse.swt
projects and choose Delete, including selecting the Delete project contents on disk option.org.eclipse.swt
project but not the others. When the wizard completes, the project will be in the workspace. There will be some compile errors at this point, which will be fixed in the next section.The Git support in Eclipse provides a way of cloning repositories to the local disk, and then checking out the projects once the clone is complete. Repositories at Eclipse are available to check out from http://git.eclipse.org/c/ although the GitWeb browser is available at http://git.eclipse.org/c/. There is a Gerrit-based review system that hosts the repositories and reviews at http://git.eclipse.org/r/ as well, which will be covered in a later section in this chapter. There are clones of many Eclipse repositories at GitHub under the https://github.com/eclipse/ organization as well, although not all repositories are mirrored.
Projects at Eclipse are organized in two levels. The top level is generally a high-level partitioning; examples include platform
, mylyn
, egit
, jdt
, and pde
. The Git repositories are a second level down and often include either the prefix of the project or the prefix excluding the org
component.
Plug-ins developed in the same feature are typically co-hosted in the same repository. Each project organizes the layout in a different way, but will often have the name of the plug-in at the top level of the project, or underneath a bundles
directory.
When a repository is cloned to the local disk, a copy of the project and all its history are made available. EGit will default to ~/git
as the storage location for Git repositories; this can be changed in the Preferences | Team | Git preferences pane in the Default repository folder entry. Each repository can have one actively checked-out branch at a time; this is typically master for ongoing development, but there are branches for the release streams.
Finally, the import wizard searches for the .project
entries in order to import them into the workspace.
The Plug-ins view also allows projects to be imported from the repository by choosing Import As | Project from a Repository. If the Manifest contains an Eclipse-SourceReferences
header containing a standard scm:
Maven repository URL, then the project will automatically be imported from that location.
3.144.250.169