Interface ILibraryProjectManager


  • public interface ILibraryProjectManager
    A manager of projects which were created or updated based on libraries.

    Clients may:

    • Export a project as a library to a zip file.
    • Read a library metainformation from the library file.
    • Create a project based on a library.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void connectProjectToLibrary​(IDtProject dtProject, LibraryDescriptor libraryDescriptor)
      Connects the project to the library.
      org.eclipse.core.resources.IProject createProject​(String projectName, LibraryDescriptor libraryDescriptor, Version version, org.eclipse.core.runtime.IProgressMonitor monitor)
      Creates a configuration project based on the given library.
      org.eclipse.core.resources.IProject createProject​(String projectName, Path projectPath, LibraryDescriptor libraryDescriptor, Version version, org.eclipse.core.runtime.IProgressMonitor monitor)
      Creates a configuration project based on the given library.
      org.eclipse.core.resources.IProject createProject​(String projectName, Path libraryPath, Version version, org.eclipse.core.runtime.IProgressMonitor monitor)
      Creates a configuration project based on the given library.
      org.eclipse.core.resources.IProject createProject​(String projectName, Path projectPath, Path libraryPath, Version version, org.eclipse.core.runtime.IProgressMonitor monitor)
      Creates a configuration project based on the given library.
      void exportLibrary​(org.eclipse.core.resources.IProject project, Path destinationPath, org.eclipse.core.runtime.IProgressMonitor monitor)
      Exports the given project as a library to a file.
      LibraryDescriptor readLibraryMetainformation​(Path libraryPath)
      Reads the library metainformation from the library file.
    • Method Detail

      • exportLibrary

        void exportLibrary​(org.eclipse.core.resources.IProject project,
                           Path destinationPath,
                           org.eclipse.core.runtime.IProgressMonitor monitor)
                    throws IOException
        Exports the given project as a library to a file. Now only the configuration project is supported, the configuration version and vendor must be specified.
        Parameters:
        project - the project to export as a library, cannot be null
        destinationPath - the destination path to export, cannot be null
        monitor - the monitor to indicate the progress, may be null
        Throws:
        IOException - if an I/O error has occurred
      • createProject

        org.eclipse.core.resources.IProject createProject​(String projectName,
                                                          Path libraryPath,
                                                          Version version,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                                   throws IOException,
                                                          InvalidLibraryDescriptorException,
                                                          org.eclipse.core.runtime.CoreException
        Creates a configuration project based on the given library.
        Parameters:
        projectName - the project name, cannot be null
        libraryPath - the library file path, cannot be null
        version - the project runtime version, cannot be null
        monitor - the monitor to indicate the progress, may be null
        Returns:
        the created configuration project, never null
        Throws:
        IOException - if an I/O error has occurred
        InvalidLibraryDescriptorException - if failed to found library description attributes
        org.eclipse.core.runtime.CoreException - if failed to create a project
      • createProject

        org.eclipse.core.resources.IProject createProject​(String projectName,
                                                          Path projectPath,
                                                          Path libraryPath,
                                                          Version version,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                                   throws IOException,
                                                          InvalidLibraryDescriptorException,
                                                          org.eclipse.core.runtime.CoreException
        Creates a configuration project based on the given library.
        Parameters:
        projectName - the project name, cannot be null
        projectPath - the project path, may be null
        libraryPath - the library file path, cannot be null
        version - the project runtime version, cannot be null
        monitor - the monitor to indicate the progress, may be null
        Returns:
        the created configuration project, never null
        Throws:
        IOException - if an I/O error has occurred
        InvalidLibraryDescriptorException - if failed to found library description attributes
        org.eclipse.core.runtime.CoreException - if failed to create a project
      • createProject

        org.eclipse.core.resources.IProject createProject​(String projectName,
                                                          LibraryDescriptor libraryDescriptor,
                                                          Version version,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                                   throws org.eclipse.core.runtime.CoreException
        Creates a configuration project based on the given library.
        Parameters:
        projectName - the project name, cannot be null
        libraryDescriptor - the library descriptor to create the project based on, cannot be null
        version - the project runtime version, cannot be null
        monitor - the monitor to indicate the progress, may be null
        Returns:
        the created configuration project, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if failed to create a project
      • createProject

        org.eclipse.core.resources.IProject createProject​(String projectName,
                                                          Path projectPath,
                                                          LibraryDescriptor libraryDescriptor,
                                                          Version version,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor)
                                                   throws org.eclipse.core.runtime.CoreException
        Creates a configuration project based on the given library.
        Parameters:
        projectName - the project name, cannot be null
        projectPath - the project path, may be null
        libraryDescriptor - the library descriptor to create the project based on, cannot be null
        version - the project runtime version, cannot be null
        monitor - the monitor to indicate the progress, may be null
        Returns:
        the created configuration project, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if failed to create a project
      • connectProjectToLibrary

        void connectProjectToLibrary​(IDtProject dtProject,
                                     LibraryDescriptor libraryDescriptor)
                              throws IOException,
                                     org.eclipse.core.runtime.CoreException,
                                     ProjectManifestException
        Connects the project to the library.
        Parameters:
        dtProject - the DT workspace project to connect the library for, cannot be null
        libraryDescriptor - the library descriptor to connect to, cannot be null
        Throws:
        IOException
        org.eclipse.core.runtime.CoreException
        ProjectManifestException