Utility methods for miscellaneous suite module operations like moving its
subModules between individual suites, removing subModules, adding and other
handy methods.
Note that some of the methods may acquire
ProjectManager.mutex read
or write access. See javadoc to individual methods.
author: Martin Krauskopf
contains(SuiteProject suite, NbModuleProject project) Returns whether a given suite already contains a given project or a
project with the same code name base.
getSuiteDirectory(Project project) Convenient method for getting a suite directory from a given project
which should contain an instance of
SuiteProvider in its lookup.
removeModuleFromSuiteWithDependencies(NbModuleProject suiteComponent) Removes module from its current suite if the given module is a suite
component and also remove all dependencies on this module from the suite
components in the same suite.
Adds the given module to the given suite if it is not already contained
there. If the module is already suite component of another suite it will
be appropriatelly removed from it (i.e moved from module's current suite
to the given suite).
Utility method to acquire modules contains within a given suite. Just
delegates to
SubprojectProvider.getSubprojects .
getSuiteDirectory
public static File getSuiteDirectory(Project project)(Code)
Convenient method for getting a suite directory from a given project
which should contain an instance of
SuiteProvider in its lookup.
either suite directory or null
getSuiteDirectoryPath
public static String getSuiteDirectoryPath(Project project)(Code)
public static boolean isSuite(File maybeSuiteDir)(Code)
Returns whether a given directory contains regular suite. Note
it returns false for suite components.
true if a given directory contains regularsuite; false otherwise.
Removes module from its current suite if the given module is a suite
component and also remove all dependencies on this module from the suite
components in the same suite.