Package jetbrains.mps.project.dependency
Class GlobalModuleDependenciesManager
- java.lang.Object
 - 
- jetbrains.mps.project.dependency.GlobalModuleDependenciesManager
 
 
- 
public class GlobalModuleDependenciesManager extends Object
This class helps extracting all dependencies of a given type for a given set of modules. E.g. we can give it a set of modules and ask, which modules are needed to compile the given set: new GlobalModuleDependenciesManager(startSet).getModules(Deptype.COMPILE) Note that if we have M modules and N dependencies, and want to know something about a set of S modules, this will work O(M+N) in the worst case, regardless of S 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlobalModuleDependenciesManager.Deptypestatic interfaceGlobalModuleDependenciesManager.ErrorHandler 
- 
Field Summary
Fields Modifier and Type Field Description static GlobalModuleDependenciesManager.ErrorHandlerDEFAULT_HANDLER 
- 
Constructor Summary
Constructors Constructor Description GlobalModuleDependenciesManager(Collection<? extends SModule> modules)GlobalModuleDependenciesManager(Collection<? extends SModule> modules, GlobalModuleDependenciesManager.ErrorHandler handler)GlobalModuleDependenciesManager(SModule module)GlobalModuleDependenciesManager(SModule module, GlobalModuleDependenciesManager.ErrorHandler handler) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Collection<SModule>getModules(GlobalModuleDependenciesManager.Deptype depType)Return all modules of a given dependency type in scope of givenCollection<SModule>getOnlyReexportModules()Deprecated.one usage does not justify method's existenceCollection<Language>getUsedLanguages()Deprecated.UseSModule.getUsedLanguages()directly. 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_HANDLER
public static final GlobalModuleDependenciesManager.ErrorHandler DEFAULT_HANDLER
 
 - 
 
- 
Constructor Detail
- 
GlobalModuleDependenciesManager
public GlobalModuleDependenciesManager(Collection<? extends SModule> modules, @NotNull GlobalModuleDependenciesManager.ErrorHandler handler)
 
- 
GlobalModuleDependenciesManager
public GlobalModuleDependenciesManager(Collection<? extends SModule> modules)
 
- 
GlobalModuleDependenciesManager
public GlobalModuleDependenciesManager(@NotNull SModule module, GlobalModuleDependenciesManager.ErrorHandler handler)
 
 - 
 
- 
Method Detail
- 
getUsedLanguages
@Deprecated public Collection<Language> getUsedLanguages()
Deprecated.UseSModule.getUsedLanguages()directly.- Returns:
 - all languages used by the given modules
 
 
- 
getOnlyReexportModules
@Deprecated public Collection<SModule> getOnlyReexportModules()
Deprecated.one usage does not justify method's existenceReturn only modules with 'reexport' mark in the dependents subtree 
- 
getModules
@NotNull public Collection<SModule> getModules(GlobalModuleDependenciesManager.Deptype depType)
Return all modules of a given dependency type in scope of given RUNTIMES: If we need runtimes, this only adds additional edges to our graph. M -uses> L -runtime> R is equivalent to M -non-reexp> R in this case REEXPORT: If we need dependencies with respect to reexport flag, we should first collect all neighbours of the given nodes in graph, and then, considering the graph with "reexport" edges only, collect all nodes accessible from (start set+neighbours) in this graph If we don't respect reexport flag, we should collect all accessible nodes from the given set in a dependencies graph. The "neighbours scheme" works in this case, too.- Parameters:
 depType- determines the type of dependencies we want to get- Returns:
 - all modules in scope of given
 
 
 - 
 
 -