Interface IClasspathContributor


  • public interface IClasspathContributor
    Implementors of this interface can contribute additional IClasspathEntry to a plug-in project as the classpath is computed. The contributor is consulted when the initial classpath for a plug-in project is calculated as well as whenever a new bundle dependency is created.

    A classpath contributor is declared as an extension (org.eclipse.pde.core.pluginClasspathContributors).

    The added classpath entries are only stored as long as the project classpath is and will not be considered during plug-in or feature export.

    Since:
    3.9
    • Method Detail

      • getInitialEntries

        List<IClasspathEntry> getInitialEntries​(BundleDescription project)
        Get any additional classpath entries to add to a project when its classpath is first computed. The provided BundleDescription describes the plug-in project that the classpath is being computed for. Additional PDE model information can be obtained using PluginRegistry.findModel(BundleDescription).
        Parameters:
        project - the bundle descriptor for the plug-in project having its classpath computed
        Returns:
        additional classpath entries to add to the project, possibly empty, must not be null
      • getEntriesForDependency

        List<IClasspathEntry> getEntriesForDependency​(BundleDescription project,
                                                      BundleDescription addedDependency)
        Get any additional classpath entries to add to a project when a new bundle is being added to the project classpath as a dependency. The BundleDescription is provided for both the plug-in that the classpath is being calculated for and the dependency being added. The dependency may be a project in the workspace or an external bundle from the target platform.
        Parameters:
        project - the bundle descriptor for the plug-in project having its classpath computed
        addedDependency - the bundle descriptor for the bundle being added to the classpath as a dependency
        Returns:
        additional classpath entries to add to the project, possibly empty, must not be null