Package jetbrains.mps.project
Class GlobalScope
- java.lang.Object
 - 
- jetbrains.mps.smodel.BaseScope
 - 
- jetbrains.mps.project.GlobalScope
 
 
 
- 
- All Implemented Interfaces:
 CoreComponent,SearchScope
public class GlobalScope extends BaseScope implements CoreComponent
Global in a sense 'global for a given repository'. Since we used to have single repository, deemed 'global'. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected SRepositorymyRepository 
- 
Constructor Summary
Constructors Constructor Description GlobalScope(SRepository moduleRepository) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddispose()static GlobalScopegetInstance()Deprecated.there ain't no such thing as 'global' scope, useGlobalScope(SRepository)Iterable<SModel>getModels()Iterable<SModule>getModules()voidinit()SModelresolve(SModelReference reference)Finder use this method to go from model reference to SModel object, Find Usages client may use this method to limit what's visible/accessible to a Finder.SModuleresolve(SModuleReference reference)Finder use this method to go from module reference to SModule object, Find Usages client may use this method to limit what's visible/accessible to a Finder.StringtoString()- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.jetbrains.mps.openapi.module.SearchScope
resolve 
 - 
 
 - 
 
- 
- 
Field Detail
- 
myRepository
protected final SRepository myRepository
 
 - 
 
- 
Constructor Detail
- 
GlobalScope
public GlobalScope(SRepository moduleRepository)
 
 - 
 
- 
Method Detail
- 
getInstance
@Deprecated public static GlobalScope getInstance()
Deprecated.there ain't no such thing as 'global' scope, useGlobalScope(SRepository) 
- 
init
public void init()
- Specified by:
 initin interfaceCoreComponent
 
- 
dispose
public void dispose()
- Specified by:
 disposein interfaceCoreComponent
 
- 
getModules
@NotNull public Iterable<SModule> getModules()
- Specified by:
 getModulesin interfaceSearchScope- Specified by:
 getModulesin classBaseScope- Returns:
 - all modules 
jetbrains.mps.ide.findusages.findalgorithm.finders.Findershall look into for occurrences 
 
- 
getModels
@NotNull public Iterable<SModel> getModels()
- Specified by:
 getModelsin interfaceSearchScope- Overrides:
 getModelsin classBaseScope- Returns:
 - all models 
jetbrains.mps.ide.findusages.findalgorithm.finders.Findershall look into for occurrences 
 
- 
resolve
public SModule resolve(@NotNull SModuleReference reference)
Description copied from interface:SearchScopeFinder use this method to go from module reference to SModule object, Find Usages client may use this method to limit what's visible/accessible to a Finder. shall always resolve references to modules fromSearchScope.getModules()- Specified by:
 resolvein interfaceSearchScope- Overrides:
 resolvein classBaseScope- Parameters:
 reference- module to look up in the scope- Returns:
 - module instance, or 
nullif there's no such module in the scope 
 
- 
resolve
public SModel resolve(@NotNull SModelReference reference)
Description copied from interface:SearchScopeFinder use this method to go from model reference to SModel object, Find Usages client may use this method to limit what's visible/accessible to a Finder. Generally, finder use this method to resolve references to search values shall always resolve references to models fromSearchScope.getModels()- Specified by:
 resolvein interfaceSearchScope- Overrides:
 resolvein classBaseScope- Parameters:
 reference- model to look up in the scope- Returns:
 - model instance, or 
nullif model with specified reference is not visible in the scope 
 
 - 
 
 -