Package jetbrains.mps.extapi.module
Interface SRepositoryExt
- 
- All Superinterfaces:
 SRepository
- All Known Implementing Classes:
 MPSModuleRepository,ProjectRepository
public interface SRepositoryExt extends SRepository
Extension ofSRepositoryAPI. Adds API we are either uncertain with yet, or API that at the moment depends on our internal classes/interfaces, and thus not quite ready to roll out.- Since:
 - 3.3
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<SModule>getModules(MPSModuleOwner moduleOwner)Set<MPSModuleOwner>getOwners(SModule module)<T extends SModule>
TregisterModule(T module, MPSModuleOwner owner)Need register/unregister API for modules because at the moment registration goes through static instance ofMPSModuleRepository.voidunregisterModule(SModule module, MPSModuleOwner owner)Unregisters given module only (e.g.- 
Methods inherited from interface org.jetbrains.mps.openapi.module.SRepository
addRepositoryListener, getModelAccess, getModule, getModules, getParent, getRepositoryAccess, removeRepositoryListener, saveAll 
 - 
 
 - 
 
- 
- 
Method Detail
- 
registerModule
<T extends SModule> T registerModule(@NotNull T module, @NotNull MPSModuleOwner owner)
Need register/unregister API for modules because at the moment registration goes through static instance ofMPSModuleRepository. Not an API right away due to (a) MPSModuleOwner is not an API; (b) not certain whether we shall have separate 'editable' SRepository interface (like EditableSModel), which sounds rather stupid but it's the way it runs in the rest of MPS, or the API shall become part of SRepository, but this rises a question if the API shall fail in a harsh or silent way for repositories that do not support change (c) I don't like return value for the method, but it's the way MPSModuleRepository have it. I don't quite buy "single module in a repo, with multiple *owners*" story. If it's truly needed, we could accomplish the same with register(getModule(moduleRef), anotherOwner), rather than return value Promise: once returns, module is attached to the repositoryMPSModuleRepository.registerModule(SModule, MPSModuleOwner) 
- 
unregisterModule
void unregisterModule(@NotNull SModule module, @NotNull MPSModuleOwner owner)
Unregisters given module only (e.g. in case of a language, it's not repository responsibility to care about language generators) 
- 
getOwners
Set<MPSModuleOwner> getOwners(@NotNull SModule module)
 
- 
getModules
Set<SModule> getModules(MPSModuleOwner moduleOwner)
 
 - 
 
 -