Package org.jetbrains.mps.openapi.module
Interface SModuleFacet
- 
- All Superinterfaces:
- DetachableFacet
 
 public interface SModuleFacet extends DetachableFacet Facets allow to store language or feature-specific settings on a module-level. Every facet has a language it is associated with. Facets are of differentkind, each module may host at most one facet instance of each kind. All facets associated with the used languages in a module are automatically instantiated and added to the module. Facets persist their relevant settings usingMementowhich generally ends up in a module descriptor. NOTE, facets shall not depend onModuleFacetDescriptor, their interface to outer world is bound toMementoonly. For read-only modules, facets are not expected to change/persist settings.- See Also:
- FacetsFacade
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidattach(SModule module)default voiddetach()#getModule will return null after this invocationStringgetFacetType()Identity of the facet, seeFacetsFacade.getFacetFactory(String)SModulegetModule()The owning modulevoidload(Memento memento)Allows the model root to read its previously saved configuration informationvoidsave(Memento memento)Gives the module facet the opportunity to persist into the supplied memento whatever configuration information may be needed to restore the models in the future.- 
Methods inherited from interface org.jetbrains.mps.openapi.module.DetachableFacetisAttached
 
- 
 
- 
- 
- 
Method Detail- 
getFacetType@NotNull String getFacetType() Identity of the facet, seeFacetsFacade.getFacetFactory(String)- Returns:
- kind of the facet
 
 - 
getModule@Nullable SModule getModule() Description copied from interface:DetachableFacetThe owning module- Specified by:
- getModulein interface- DetachableFacet
- Returns:
- the module which is hosting this facet. it is allowed to be detached from the module, so null can be seen here.
 
 - 
savevoid save(@NotNull Memento memento) Gives the module facet the opportunity to persist into the supplied memento whatever configuration information may be needed to restore the models in the future.
 - 
loadvoid load(@NotNull Memento memento) Allows the model root to read its previously saved configuration information
 - 
attachdefault void attach(@NotNull SModule module) - Specified by:
- attachin interface- DetachableFacet
- Parameters:
- module- will be returned from #getModule afterwards
 
 - 
detachdefault void detach() Description copied from interface:DetachableFacet#getModule will return null after this invocation- Specified by:
- detachin interface- DetachableFacet
 
 
- 
 
-