Class ModulesService
- java.lang.Object
-
- com.nomagic.magicdraw.core.modules.ModulesService
-
@OpenApiAll public class ModulesService extends java.lang.ObjectAn utility class to work with modules (attached projects). This class provides set of utility methods to change decomposition state of project - attach, detach, load, unload or changed attachment properties of modules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModulesService.ModuleHasElementWithSameIDAsInPrimaryExceptionAn exception that indicates that module cannot be imported because there is an element with same Local ID in the primary projectstatic classModulesService.ModuleHasOrphanProxiesExceptionstatic classModulesService.UsedViaReadOnlyAutomaticUsageExceptionThrown when module(s) can not be removed due to all paths from primary project to it contains a read onlyautomaticusage
-
Constructor Summary
Constructors Constructor Description ModulesService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.nomagic.ci.persistence.IAttachedProjectattachModule(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.spi.decomposition.AbstractProjectAttachmentConfiguration configuration, ProgressStatus monitor)Mounts module into current project.static com.nomagic.ci.persistence.IAttachedProjectattachModuleOnTask(com.nomagic.ci.persistence.IProject project, com.nomagic.ci.persistence.spi.decomposition.AbstractProjectAttachmentConfiguration configuration)Mounts module into current project.static booleandetachModules(java.util.Collection<ModuleUsage> usages, ProgressStatus monitor)Removes all given modules usages.static booleandetachModulesAndRemoveUnreachable(java.util.Collection<ModuleUsage> usages, com.nomagic.ci.persistence.decomposition.IAttachedProjectRemoverCallback removeConfirmation, ProgressStatus monitor)Removes all given module usages.static booleandetachModulesAndRemoveUnreachable(java.util.Collection<ModuleUsage> usages, ProgressStatus monitor)Removes all given module usages.static booleandetachModulesAndRemoveUnreachableOnTask(java.util.Collection<ModuleUsage> usages)Removes all given module usages.static booleandetachModulesOnTask(java.util.Collection<ModuleUsage> usages)Removes all given modules usages.static com.nomagic.ci.persistence.IAttachedProjectfindOrLoadLocalModule(Project project, java.lang.String filePath, boolean allowUI)Attaches local module from given path into a given project.static com.nomagic.ci.persistence.IAttachedProjectfindOrLoadModule(Project project, ProjectDescriptor moduleLocation, boolean allowUI)Looks for existing module in a given project.static com.nomagic.ci.persistence.IAttachedProjectfindOrLoadModule(Project project, ProjectDescriptor moduleLocation, ProgressStatus monitor, boolean allowUI)Looks for already attached module in a given project.static com.nomagic.ci.persistence.mounting.IMountPointgetMountPoint(java.util.Collection<com.nomagic.ci.persistence.mounting.IMountPoint> points, Package element)Find mount point in a given collection which mounts a given package.static voidimportModule(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, ProgressStatus monitor)static voidimportModule(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, ProgressStatus monitor, boolean regenerateElementIDs)Removes module descriptor and makes all its contents as it is local project content.static voidimportModuleOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module)Removes module descriptor and makes all its contents as it is local project content.static voidimportModuleOnTask(Project project, com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, boolean newIDs, boolean ignoreDirty, boolean checkModulePassword, java.util.Map<java.lang.String,java.lang.Object> importOptions, ProgressStatus progress)Imports given module into given project using given configurationstatic booleanprocessException(Project prj, java.lang.Exception e, java.lang.String failedOperationMessage)static voidreMount(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.util.Collection<MountedPackageInfo> mountedPackagesInfo, ProgressStatus monitor)Re-mount given module on different mount points.static voidreMountOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.util.Collection<MountedPackageInfo> mountedPackagesInfo)Change mount point locationstatic voidremoveModules(java.util.Set<com.nomagic.ci.persistence.IAttachedProject> selectedModules, com.nomagic.ci.persistence.decomposition.IAttachedProjectRemoverCallback removeConfirmation, ProgressStatus progress)Removes the selected modulesstatic voidremoveModulesOnTask(java.util.Set<com.nomagic.ci.persistence.IAttachedProject> selectedModules, com.nomagic.ci.persistence.decomposition.IAttachedProjectRemoverCallback removeConfirmation)Removes the selected modules on taskstatic voidsetAutoLoadKind(com.nomagic.ci.persistence.decomposition.ProjectAttachmentConfiguration configuration, AutoLoadKind autoLoadKind)Set auto load kind for a given configuration.static voidsetAutoLoadKind(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.decomposition.ProjectAttachmentConfiguration configuration, AutoLoadKind kind)Set module load kindstatic voidsetAutoLoadKind(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.decomposition.ProjectAttachmentConfiguration configuration, AutoLoadKind kind, ProgressStatus monitor)Set module load kindstatic voidsetAutoLoadKind(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, AutoLoadKind kind, ProgressStatus monitor)Set module load kindstatic voidsetAutoLoadKindOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, AutoLoadKind kind)Set module load kindstatic voidsetCompatibleVersion(com.nomagic.ci.persistence.IProject project, java.lang.String version)Set compatible version for a given projectstatic voidsetInternalVersion(com.nomagic.ci.persistence.IProject project, java.lang.String version)Set internal version for a given projectstatic voidsetReadOnly(java.util.Collection<ModuleUsage> usages, boolean readOnly, ProgressStatus monitor)Make module usage readonlystatic voidsetReadOnlyOnTask(java.util.Collection<ModuleUsage> usages, boolean readOnly)Make module usage readonlystatic voidsetReShared(com.nomagic.ci.persistence.IProject project, com.nomagic.ci.persistence.IProject module, boolean reShared, ProgressStatus monitor)Re-share given module in a given projectstatic voidsetReSharedOnTask(com.nomagic.ci.persistence.IProject project, com.nomagic.ci.persistence.IProject module, boolean reShared)Reshare given module in a given projectstatic voidsetSharePreferredPath(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path, ProgressStatus monitor)Set preferred path for mounting for given shared packagestatic voidsetSharePreferredPathOnTask(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path)Set preferred path for mounting for given shared packagestatic voidsetStandardSystemProfile(com.nomagic.ci.persistence.IProject project, boolean standard)Mark given project as "standard system profile".static voidsetStickyVersion(java.util.Collection<ModuleUsage> usages, com.nomagic.ci.persistence.versioning.IVersionDescriptor version, ProgressStatus monitor)Set sticky version for given modules usages.static voidsetStickyVersionOnTask(java.util.Collection<ModuleUsage> usages, com.nomagic.ci.persistence.versioning.IVersionDescriptor version)Set sticky version for given modules usages.static voidsetUsedVersion(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.lang.String version, ProgressStatus monitor)Set "used" version for a given module.static voidsetUsedVersionOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.lang.String version)Set "used" version for a given modulestatic com.nomagic.ci.persistence.sharing.ISharePointshare(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path, ProgressStatus monitor)Share given package in a given projectstatic com.nomagic.ci.persistence.sharing.ISharePointshareOnTask(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path)Share given package in a given projectstatic voidunShare(com.nomagic.ci.persistence.IProject project, Package pkg, ProgressStatus monitor)Un-share given package from a given projectstatic voidunShareOnTask(com.nomagic.ci.persistence.IProject project, Package pkg)Un-share given package from a given project
-
-
-
Method Detail
-
attachModule
@CheckForNull public static com.nomagic.ci.persistence.IAttachedProject attachModule(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.spi.decomposition.AbstractProjectAttachmentConfiguration configuration, @CheckForNull ProgressStatus monitor) throws com.nomagic.ci.persistence.PersistenceExceptionMounts module into current project. Default mount path is used.- Parameters:
owner- owner to attach module toconfiguration- configurationmonitor- progress status- Returns:
- module descriptor
- Throws:
com.nomagic.ci.persistence.PersistenceException- in case of persistence problems
-
attachModuleOnTask
public static com.nomagic.ci.persistence.IAttachedProject attachModuleOnTask(com.nomagic.ci.persistence.IProject project, com.nomagic.ci.persistence.spi.decomposition.AbstractProjectAttachmentConfiguration configuration)Mounts module into current project. Default mount path is used.- Parameters:
project- projectconfiguration- configuration- Returns:
- module descriptor
-
reMount
public static void reMount(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.util.Collection<MountedPackageInfo> mountedPackagesInfo, ProgressStatus monitor)Re-mount given module on different mount points.- Parameters:
owner- module ownermodule- module to remountmountedPackagesInfo- new information about mount pointsmonitor- progress monitor
-
reMountOnTask
public static void reMountOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.util.Collection<MountedPackageInfo> mountedPackagesInfo)Change mount point location- Parameters:
owner- projectmodule- modulemountedPackagesInfo- new mounting information
-
detachModules
public static boolean detachModules(java.util.Collection<ModuleUsage> usages, @CheckForNull ProgressStatus monitor) throws java.lang.Exception
Removes all given modules usages. If module is used more than one time only remove usage, in other case module data will be disposed.- Parameters:
usages- modules to removemonitor- monitor- Returns:
- true if all modules were detached, false if user cancelled operation
- Throws:
java.lang.Exception- if detach fails.
-
detachModulesAndRemoveUnreachable
public static boolean detachModulesAndRemoveUnreachable(java.util.Collection<ModuleUsage> usages, ProgressStatus monitor) throws java.lang.Exception
Removes all given module usages. If new modules become manually unreachable during the operation - they will be removed too if possible- Parameters:
usages- the usages to removemonitor- the progress monitor for the operation- Returns:
- true if all modules were detached, false if user cancelled operation
- Throws:
java.lang.Exception
-
detachModulesAndRemoveUnreachable
public static boolean detachModulesAndRemoveUnreachable(java.util.Collection<ModuleUsage> usages, @CheckForNull com.nomagic.ci.persistence.decomposition.IAttachedProjectRemoverCallback removeConfirmation, ProgressStatus monitor) throws java.lang.Exception
Removes all given module usages. If new modules become manually unreachable during the operation - they will be removed too if possible- Parameters:
usages- the usages to removeremoveConfirmation- remove confirmationmonitor- the progress monitor for the operation- Returns:
- true if all modules were detached, false if user cancelled operation
- Throws:
java.lang.Exception
-
detachModulesAndRemoveUnreachableOnTask
public static boolean detachModulesAndRemoveUnreachableOnTask(java.util.Collection<ModuleUsage> usages)
Removes all given module usages. If new modules become manually unreachable during the operation - they will be removed too if possible- Parameters:
usages- the usages to remove- Returns:
- true if all modules were detached, false if user cancelled operation
-
detachModulesOnTask
public static boolean detachModulesOnTask(java.util.Collection<ModuleUsage> usages)
Removes all given modules usages. If module is used more than one time only remove usage, in other case module data will be disposed.- Parameters:
usages- module usages to remove- Returns:
- true if all modules were detached, false if user cancelled operation
-
removeModules
public static void removeModules(java.util.Set<com.nomagic.ci.persistence.IAttachedProject> selectedModules, @CheckForNull com.nomagic.ci.persistence.decomposition.IAttachedProjectRemoverCallback removeConfirmation, @CheckForNull ProgressStatus progress) throws ModulesService.UsedViaReadOnlyAutomaticUsageException, com.nomagic.ci.persistence.PersistenceExceptionRemoves the selected modules- Parameters:
selectedModules- the modules to removeremoveConfirmation- the confirmation call back that will be used to confirm the removeprogress- the progress monitor for the operation- Throws:
ModulesService.UsedViaReadOnlyAutomaticUsageExceptioncom.nomagic.ci.persistence.PersistenceException
-
removeModulesOnTask
public static void removeModulesOnTask(java.util.Set<com.nomagic.ci.persistence.IAttachedProject> selectedModules, @CheckForNull com.nomagic.ci.persistence.decomposition.IAttachedProjectRemoverCallback removeConfirmation)Removes the selected modules on task- Parameters:
selectedModules- the modules to removeremoveConfirmation- the confirmation call back that will be used to confirm the remove
-
importModule
public static void importModule(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, @CheckForNull ProgressStatus monitor) throws java.lang.Exception- Throws:
java.lang.Exception
-
importModule
public static void importModule(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, @CheckForNull ProgressStatus monitor, boolean regenerateElementIDs) throws java.lang.ExceptionRemoves module descriptor and makes all its contents as it is local project content.- Parameters:
owner- module ownermodule- to importmonitor- progress statusregenerateElementIDs- if true module element id will be generated- Throws:
java.lang.Exception- exception is something goes wrong
-
getMountPoint
@CheckForNull public static com.nomagic.ci.persistence.mounting.IMountPoint getMountPoint(java.util.Collection<com.nomagic.ci.persistence.mounting.IMountPoint> points, Package element)Find mount point in a given collection which mounts a given package.- Parameters:
points- mount pointselement- package- Returns:
- found mount point
-
importModuleOnTask
public static void importModuleOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module)Removes module descriptor and makes all its contents as it is local project content.- Parameters:
owner- module ownermodule- to import
-
importModuleOnTask
public static void importModuleOnTask(Project project, com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, boolean newIDs, boolean ignoreDirty, boolean checkModulePassword, @CheckForNull java.util.Map<java.lang.String,java.lang.Object> importOptions, @CheckForNull ProgressStatus progress) throws java.lang.Exception
Imports given module into given project using given configuration- Parameters:
project- the context projectowner- the project to import tomodule- the module to importnewIDs-trueif element IDs should be changedignoreDirty-trueif project dirty state should be ignoredcheckModulePassword-trueif module password should be checked,falseif notimportOptions- import implementation dependent options (passed toIProjectJoiningService.join(IAttachedProject, com.nomagic.ci.persistence.local.decomposition.IProjectJoiningFeatureProvider, Map, ProgressStatus))progress- the progress to use (optional, will report to a separate progress if not provided)- Throws:
java.lang.Exception
-
processException
public static boolean processException(@CheckForNull Project prj, java.lang.Exception e, java.lang.String failedOperationMessage)
-
setReadOnly
public static void setReadOnly(java.util.Collection<ModuleUsage> usages, boolean readOnly, ProgressStatus monitor) throws com.nomagic.ci.persistence.PersistenceException
Make module usage readonly- Parameters:
usages- module usagesreadOnly- readonly flagmonitor- monitor- Throws:
com.nomagic.ci.persistence.PersistenceException- in case of some persistence problem
-
setReadOnlyOnTask
public static void setReadOnlyOnTask(java.util.Collection<ModuleUsage> usages, boolean readOnly)
Make module usage readonly- Parameters:
usages- module usagesreadOnly- readonly flag
-
setAutoLoadKind
public static void setAutoLoadKind(com.nomagic.ci.persistence.decomposition.ProjectAttachmentConfiguration configuration, AutoLoadKind autoLoadKind)Set auto load kind for a given configuration.- Parameters:
configuration- configuration to change auto load.autoLoadKind- auto load kind
-
setAutoLoadKind
public static void setAutoLoadKind(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.decomposition.ProjectAttachmentConfiguration configuration, AutoLoadKind kind, ProgressStatus monitor) throws com.nomagic.ci.persistence.PersistenceExceptionSet module load kind- Parameters:
owner- module ownerconfiguration- attachment configurationkind- load kindmonitor- monitor- Throws:
com.nomagic.ci.persistence.PersistenceException- in case of some persistence problem
-
setAutoLoadKind
public static void setAutoLoadKind(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.decomposition.ProjectAttachmentConfiguration configuration, AutoLoadKind kind)Set module load kind- Parameters:
owner- module ownerconfiguration- attachment configurationkind- load kind
-
setAutoLoadKind
public static void setAutoLoadKind(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, AutoLoadKind kind, ProgressStatus monitor) throws com.nomagic.ci.persistence.PersistenceExceptionSet module load kind- Parameters:
owner- module ownermodule- modulekind- load kindmonitor- monitor- Throws:
com.nomagic.ci.persistence.PersistenceException- in case of some persistence problem
-
setAutoLoadKindOnTask
public static void setAutoLoadKindOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, AutoLoadKind kind)Set module load kind- Parameters:
owner- module ownermodule- modulekind- load kind
-
setReSharedOnTask
public static void setReSharedOnTask(com.nomagic.ci.persistence.IProject project, com.nomagic.ci.persistence.IProject module, boolean reShared)Reshare given module in a given project- Parameters:
project- projectmodule- modulereShared- add or remove re-sharing
-
setReShared
public static void setReShared(com.nomagic.ci.persistence.IProject project, com.nomagic.ci.persistence.IProject module, boolean reShared, @CheckForNull ProgressStatus monitor)Re-share given module in a given project- Parameters:
project- projectmodule- modulereShared- add ore remove re-sharingmonitor- monitor
-
shareOnTask
public static com.nomagic.ci.persistence.sharing.ISharePoint shareOnTask(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path)Share given package in a given project- Parameters:
project- projectpkg- package to sharepath- preferred path for mounting- Returns:
- share point
-
share
public static com.nomagic.ci.persistence.sharing.ISharePoint share(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path, ProgressStatus monitor) throws com.nomagic.ci.persistence.local.spi.InvalidProjectObjectException, com.nomagic.ci.persistence.LockAcquisitionExceptionShare given package in a given project- Parameters:
project- projectpkg- package to sharepath- preferred path for mountingmonitor- monitor- Returns:
- share point
- Throws:
com.nomagic.ci.persistence.local.spi.InvalidProjectObjectExceptioncom.nomagic.ci.persistence.LockAcquisitionException- if locking required elements fails during the operation
-
setSharePreferredPathOnTask
public static void setSharePreferredPathOnTask(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path)Set preferred path for mounting for given shared package- Parameters:
project- projectpkg- packagepath- preferred mounting path
-
setSharePreferredPath
public static void setSharePreferredPath(com.nomagic.ci.persistence.IProject project, Package pkg, java.lang.String path, @CheckForNull ProgressStatus monitor) throws com.nomagic.ci.persistence.local.spi.InvalidProjectObjectExceptionSet preferred path for mounting for given shared package- Parameters:
project- projectpkg- packagepath- preferred mounting pathmonitor- monitor- Throws:
com.nomagic.ci.persistence.local.spi.InvalidProjectObjectException
-
setStandardSystemProfile
public static void setStandardSystemProfile(com.nomagic.ci.persistence.IProject project, boolean standard)Mark given project as "standard system profile".- Parameters:
project- projectstandard- mark as standard profile
-
setInternalVersion
public static void setInternalVersion(com.nomagic.ci.persistence.IProject project, @CheckForNull java.lang.String version)Set internal version for a given project- Parameters:
project- projectversion- version
-
setCompatibleVersion
public static void setCompatibleVersion(com.nomagic.ci.persistence.IProject project, @CheckForNull java.lang.String version)Set compatible version for a given project- Parameters:
project- projectversion- version
-
setUsedVersionOnTask
public static void setUsedVersionOnTask(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.lang.String version)Set "used" version for a given module- Parameters:
owner- module ownermodule- moduleversion- version
-
setUsedVersion
public static void setUsedVersion(com.nomagic.ci.persistence.IProject owner, com.nomagic.ci.persistence.IAttachedProject module, java.lang.String version, ProgressStatus monitor) throws com.nomagic.ci.persistence.PersistenceExceptionSet "used" version for a given module.- Parameters:
owner- module ownermodule- moduleversion- versionmonitor- monitor- Throws:
com.nomagic.ci.persistence.PersistenceException- if any persistence problem
-
unShare
public static void unShare(com.nomagic.ci.persistence.IProject project, Package pkg, ProgressStatus monitor) throws com.nomagic.ci.persistence.local.spi.InvalidProjectObjectException, com.nomagic.ci.persistence.LockAcquisitionExceptionUn-share given package from a given project- Parameters:
project- projectpkg- package to un-sharemonitor- monitor- Throws:
com.nomagic.ci.persistence.local.spi.InvalidProjectObjectExceptioncom.nomagic.ci.persistence.LockAcquisitionException- if locking required elements fails during the operation
-
unShareOnTask
public static void unShareOnTask(com.nomagic.ci.persistence.IProject project, Package pkg)Un-share given package from a given project- Parameters:
project- projectpkg- package to un-share
-
setStickyVersion
public static void setStickyVersion(java.util.Collection<ModuleUsage> usages, @CheckForNull com.nomagic.ci.persistence.versioning.IVersionDescriptor version, ProgressStatus monitor) throws com.nomagic.ci.persistence.PersistenceException
Set sticky version for given modules usages.- Parameters:
usages- usagesversion- sticky version(null if no sticky versionmonitor- progress monitor- Throws:
com.nomagic.ci.persistence.PersistenceException- in case of some persistence problem
-
setStickyVersionOnTask
public static void setStickyVersionOnTask(java.util.Collection<ModuleUsage> usages, @CheckForNull com.nomagic.ci.persistence.versioning.IVersionDescriptor version)
Set sticky version for given modules usages.- Parameters:
usages- usagesversion- sticky version(null if no sticky version
-
findOrLoadLocalModule
@CheckForNull public static com.nomagic.ci.persistence.IAttachedProject findOrLoadLocalModule(Project project, java.lang.String filePath, boolean allowUI)
Attaches local module from given path into a given project. Does nothing if such module is already attached.- Parameters:
project- projectfilePath- full path to module fileallowUI- allow to show error messages to user- Returns:
- attached module
-
findOrLoadModule
@CheckForNull public static com.nomagic.ci.persistence.IAttachedProject findOrLoadModule(Project project, ProjectDescriptor moduleLocation, boolean allowUI)
Looks for existing module in a given project. If found, attaches it directly in project. If module is not found, attaches and loads it.- Parameters:
project- project where module is searched of loaded.moduleLocation- module descriptor to load.allowUI- allow to show error messages to user- Returns:
- found or loaded module. Null if failure.
-
findOrLoadModule
@CheckForNull public static com.nomagic.ci.persistence.IAttachedProject findOrLoadModule(Project project, @CheckForNull ProjectDescriptor moduleLocation, @CheckForNull ProgressStatus monitor, boolean allowUI)
Looks for already attached module in a given project. or attaches a new one. If such module is already attached not directly, attaches it directly in a given project. Activates given project if it is not active yet. If module is not found, attaches and loads it.- Parameters:
project- project where module is searched of loaded.moduleLocation- module descriptor to load.monitor- monitor where display status, if null new progress bar is shown.allowUI- allow to show error messages to user- Returns:
- found or newly attached module. Null if failure.
-
-