Package com.e1c.g5.v8.dt.library
Interface ILibraryProjectManager
- All Known Implementing Classes:
LibraryProjectManager
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
Modifier and TypeMethodDescriptionvoidconnectProjectToLibraries(IDtProject dtProject, Collection<LibraryDescriptor> libraryDescriptors) Connects the project to the libraries.voidconnectProjectToLibrary(IDtProject dtProject, LibraryDescriptor libraryDescriptor, boolean updateExisting) Connects the project to the library.org.eclipse.core.resources.IProjectcreateProject(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.IProjectcreateProject(String projectName, Path projectPath, LibraryDescriptor libraryDescriptor, Version version, Configuration configuration, org.eclipse.core.runtime.IProgressMonitor monitor) Creates a configuration project based on the given library.org.eclipse.core.resources.IProjectcreateProject(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.IProjectcreateProject(String projectName, Path projectPath, Path libraryPath, Version version, Configuration configuration, org.eclipse.core.runtime.IProgressMonitor monitor) Creates a configuration project based on the given library.voiddisconnectProjectFromLibrary(IDtProject dtProject, LibraryDescriptor libraryDescriptor) Disconnects the project form specified library (disable distribution support).voidexportLibrary(IDtProject dtProject, Path destinationPath, org.eclipse.core.runtime.IProgressMonitor monitor) Exports the given project as a library to a file.readLibraryMetainformation(Path libraryPath) Reads the library metainformation from the library file.
-
Method Details
-
exportLibrary
void exportLibrary(IDtProject dtProject, 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:
dtProject- the project to export as a library, cannot benulldestinationPath- the destination path to export, cannot benullmonitor- the monitor to indicate the progress, may benull- Throws:
IOException- if an I/O error has occurred
-
readLibraryMetainformation
LibraryDescriptor readLibraryMetainformation(Path libraryPath) throws IOException, InvalidLibraryDescriptorException Reads the library metainformation from the library file.- Parameters:
libraryPath- the library file path, cannot benull- Returns:
- the library descriptor, never
null - Throws:
IOException- if an I/O error has occurredInvalidLibraryDescriptorException- if failed to found library description attributes
-
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 benulllibraryPath- the library file path, cannot benullversion- the project runtime version, cannot benullmonitor- the monitor to indicate the progress, may benull- Returns:
- the created configuration project, never
null - Throws:
IOException- if an I/O error has occurredInvalidLibraryDescriptorException- if failed to found library description attributesorg.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, Configuration configuration, 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 benullprojectPath- the project path, may benulllibraryPath- the library file path, cannot benullversion- the project runtime version, cannot benullconfiguration- the template configuration to use during the creation, may benullmonitor- the monitor to indicate the progress, may benull- Returns:
- the created configuration project, never
null - Throws:
IOException- if an I/O error has occurredInvalidLibraryDescriptorException- if failed to found library description attributesorg.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 benulllibraryDescriptor- the library descriptor to create the project based on, cannot benullversion- the project runtime version, cannot benullmonitor- the monitor to indicate the progress, may benull- 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, Configuration configuration, 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 benullprojectPath- the project path, may benulllibraryDescriptor- the library descriptor to create the project based on, cannot benullversion- the project runtime version, cannot benullconfiguration- the template configuration to use during the creation, may benullmonitor- the monitor to indicate the progress, may benull- 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, boolean updateExisting) 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 benulllibraryDescriptor- the library descriptor to connect to, cannot benullupdateExisting- Update existing library (either up or down to the provided version) or plug a provided library as a new one- Throws:
IOException- if an I/O error has occurredorg.eclipse.core.runtime.CoreException- if failed to connect project to libraryProjectManifestException- In case when the manifest cannot be parsed due to incorrect syntax
-
connectProjectToLibraries
void connectProjectToLibraries(IDtProject dtProject, Collection<LibraryDescriptor> libraryDescriptors) throws IOException, org.eclipse.core.runtime.CoreException, ProjectManifestException Connects the project to the libraries.- Parameters:
dtProject- the DT workspace project to connect the library for, cannot benulllibraryDescriptors- the library descriptors collection to connect to, cannot benull- Throws:
IOException- if an I/O error has occurredorg.eclipse.core.runtime.CoreException- if failed to connect project to librariesProjectManifestException- In case when the manifest cannot be parsed due to incorrect syntax
-
disconnectProjectFromLibrary
void disconnectProjectFromLibrary(IDtProject dtProject, LibraryDescriptor libraryDescriptor) throws IOException, org.eclipse.core.runtime.CoreException, ProjectManifestException Disconnects the project form specified library (disable distribution support). When the configuration is disabled from a library support all the library distribution settings are discarded and library-specific resources are copied into the configuration- Parameters:
dtProject- the DT workspace project to disconnect the library from, cannot benulllibraryDescriptor- the library descriptor to disconnect from, cannot benull- Throws:
IOException- if an I/O error has occurredorg.eclipse.core.runtime.CoreException- if this method fails when accessing project manifest file. Reasons include:- This resource does not exist.
- The corresponding location in the local file system is occupied by a directory.
- The workspace is not in sync with the corresponding location
in the local file system and
forceisfalse. - Resource changes are disallowed during certain types of resource change
event notification. See
IResourceChangeEventfor more details. - The file modification validator disallowed the change.
ProjectManifestException- In case when the manifest cannot be parsed due to incorrect syntax
-