Package jetbrains.mps.languageScope
Class LanguageScopeFactory
- java.lang.Object
 - 
- jetbrains.mps.languageScope.LanguageScopeFactory
 
 
- 
- All Implemented Interfaces:
 CoreComponent,LanguageRegistryListener
public class LanguageScopeFactory extends Object implements CoreComponent, LanguageRegistryListener
User: fyodor Date: 8/27/12 
- 
- 
Constructor Summary
Constructors Constructor Description LanguageScopeFactory(LanguageRegistry languageRegistry) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterLanguagesLoaded(Iterable<LanguageRuntime> languages)voidbeforeLanguagesUnloaded(Iterable<LanguageRuntime> languages)voiddispose()intgetIndexOf(String namespace)static LanguageScopeFactorygetInstance()Deprecated.LanguageScopegetLanguageScope(Collection<SLanguage> langs)This method implements a memoization scheme for the "extended languages hierarchy" using the specified collection of languages.LanguageScopegetLanguageScope(Collection<SLanguage> langs1, Collection<SLanguage> langs2)Produces a newLanguageScopefrom the two corresponding to the parameterslangs1andlangs2by merging.LanguageScopegetMultiLanguageScope(Iterable<? extends Collection<SLanguage>> multiLangs)Produces a newLanguageScopefrom the ones corresponding to the collections in parametermultiLangs.voidinit() 
 - 
 
- 
- 
Constructor Detail
- 
LanguageScopeFactory
public LanguageScopeFactory(LanguageRegistry languageRegistry)
 
 - 
 
- 
Method Detail
- 
getInstance
@Deprecated public static LanguageScopeFactory getInstance()
Deprecated. 
- 
init
public void init()
- Specified by:
 initin interfaceCoreComponent
 
- 
dispose
public void dispose()
- Specified by:
 disposein interfaceCoreComponent
 
- 
beforeLanguagesUnloaded
public void beforeLanguagesUnloaded(Iterable<LanguageRuntime> languages)
- Specified by:
 beforeLanguagesUnloadedin interfaceLanguageRegistryListener
 
- 
afterLanguagesLoaded
public void afterLanguagesLoaded(Iterable<LanguageRuntime> languages)
- Specified by:
 afterLanguagesLoadedin interfaceLanguageRegistryListener
 
- 
getIndexOf
public int getIndexOf(String namespace)
 
- 
getLanguageScope
public LanguageScope getLanguageScope(Collection<SLanguage> langs1, Collection<SLanguage> langs2)
Produces a newLanguageScopefrom the two corresponding to the parameterslangs1andlangs2by merging.- Parameters:
 langs1-langs2-- Returns:
 
 
- 
getMultiLanguageScope
public LanguageScope getMultiLanguageScope(Iterable<? extends Collection<SLanguage>> multiLangs)
Produces a newLanguageScopefrom the ones corresponding to the collections in parametermultiLangs.- Parameters:
 multiLangs-- Returns:
 
 
- 
getLanguageScope
public LanguageScope getLanguageScope(Collection<SLanguage> langs)
This method implements a memoization scheme for the "extended languages hierarchy" using the specified collection of languages. The objects constituting the contents of thelangscollection are expected to never change, and thus can be treated as opaque. As a result, we can cache the calculated scope value with the key derived from objects representing the languages.- Parameters:
 langs- the dependencies collection; all languages included in this scope- Returns:
 
 
 - 
 
 -