Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

PDE/Importing SCMURLs

< PDE
Revision as of 16:02, 20 September 2010 by Darin Wright.ca.ibm.com (Talk | contribs) (3.6 Implementation)

Overview

SCM URLs describe the location of source code in a repository. For example, an SCM URL can be used to describe the location of a project in CVS that corresponds to a bundle in Eclipse. The SCM URL format is described here.

In Eclipse 3.6, support was added to PDE/Build to embed source repository information in bundle manifests during the build process and support was added to PDE/UI to import bundles from repositories. Following is an example manifest header describing the location of the source for the org.eclipse.debug.core bundle:

  • Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/eclipse:org.eclipse.debug.core;tag=v20100820

The 3.6 implementation of importing bundles in PDE/UI is based on two internal extension points and internal API interfaces. During 3.7, PDE would like to create official public API that can be used.


3.6 Implementation

The 3.6 implementation for importing bundles from repositories is based on the following (internal) extension points:

  • org.eclipse.pde.core.bundleImporters - Extensions contribute delegates that when given a set of bundle manifest headers can return a corresponding set of opaque bundle import description objects that can later be imported. Extensions provide an implementation of IBundleImportDelegate (defined in org.eclipse.pde.internal.core.importing.provisional).
  • org.eclipse.pde.ui.bundleImportPages - Extensions contribute one or more wizard pages used to configure bundle import description objects before import. For example, the existing implementation provides a page that allows the user to import specific project versions or from HEAD.

The current import implementation works as follows:

  • PDE parses bundle manifests in the target platform and passes each bundle manifest to each bundleImporter extension.
  • Each bundleImporter extension returns a set of bundle import descriptions for manifests that it is capable of importing
  • Bundles that can be imported are displayed in the wizard for selection
  • The user selects the bundles to import
  • A wizard page allows the user to select specific versions (as defined in the SCMURLs) or to import from HEAD
  • On finish, the configured set of bundle import descriptions are passed to the bundleImporter extensions to be imported
  • The CVS bundle importer builds a .psf format string representing what's to be imported and passes it off to the CVS for import

The cons of the current implementation are:

  • SCM URL importing is limited to PDE - it would be more flexible to offer an API at the team level.
  • PDE needs to understand and manipulate strings in the .psf format, which is intended to be opaque.
  • Each team provider would need to contribute to PDE extensions if they want their repository to be supported.

3.7 API Proposal

Back to the top