Class LibraryProjectManager
java.lang.Object
com.e1c.g5.v8.dt.internal.library.LibraryProjectManager
- All Implemented Interfaces:
ILibraryProjectManager
The default implementation of
ILibraryProjectManager.-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
LibraryProjectManager
public LibraryProjectManager()
-
-
Method Details
-
exportLibrary
public void exportLibrary(IDtProject dtProject, Path destinationPath, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException Description copied from interface:ILibraryProjectManagerExports the given project as a library to a file. Now only the configuration project is supported, the configuration version and vendor must be specified.- Specified by:
exportLibraryin interfaceILibraryProjectManager- 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
public LibraryDescriptor readLibraryMetainformation(Path libraryPath) throws IOException, InvalidLibraryDescriptorException Description copied from interface:ILibraryProjectManagerReads the library metainformation from the library file.- Specified by:
readLibraryMetainformationin interfaceILibraryProjectManager- 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
public 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 Description copied from interface:ILibraryProjectManagerCreates a configuration project based on the given library.- Specified by:
createProjectin interfaceILibraryProjectManager- 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
public 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 Description copied from interface:ILibraryProjectManagerCreates a configuration project based on the given library.- Specified by:
createProjectin interfaceILibraryProjectManager- 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
public org.eclipse.core.resources.IProject createProject(String projectName, LibraryDescriptor libraryDescriptor, Version version, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException Description copied from interface:ILibraryProjectManagerCreates a configuration project based on the given library.- Specified by:
createProjectin interfaceILibraryProjectManager- 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
public 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 Description copied from interface:ILibraryProjectManagerCreates a configuration project based on the given library.- Specified by:
createProjectin interfaceILibraryProjectManager- 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
public void connectProjectToLibrary(IDtProject dtProject, LibraryDescriptor libraryDescriptor, boolean updateExisting) throws IOException, org.eclipse.core.runtime.CoreException, ProjectManifestException Description copied from interface:ILibraryProjectManagerConnects the project to the library.- Specified by:
connectProjectToLibraryin interfaceILibraryProjectManager- 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
public void connectProjectToLibraries(IDtProject dtProject, Collection<LibraryDescriptor> libraryDescriptors) throws IOException, org.eclipse.core.runtime.CoreException, ProjectManifestException Description copied from interface:ILibraryProjectManagerConnects the project to the libraries.- Specified by:
connectProjectToLibrariesin interfaceILibraryProjectManager- 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
public void disconnectProjectFromLibrary(IDtProject dtProject, LibraryDescriptor libraryDescriptor) throws IOException, org.eclipse.core.runtime.CoreException, ProjectManifestException Description copied from interface:ILibraryProjectManagerDisconnects 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- Specified by:
disconnectProjectFromLibraryin interfaceILibraryProjectManager- 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
-