Package org.jetbrains.mps.openapi.module
Interface SModuleFacet
-
public interface SModuleFacet
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 usingMemento
which generally ends up in a module descriptor. NOTE, facets shall not depend onModuleFacetDescriptor
, their interface to outer world is bound toMemento
only. For read-only modules, facets are not expected to change/persist settings.- See Also:
FacetsFacade
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getFacetType()
Identity of the facet, seeFacetsFacade.getFacetFactory(String)
SModule
getModule()
The owning module TODO @deprecated facet is supposed to be a simple primitive flags storage.void
load(Memento memento)
Allows the model root to read its previously saved configuration informationvoid
save(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.
-
-
-
Method Detail
-
getFacetType
@NotNull String getFacetType()
Identity of the facet, seeFacetsFacade.getFacetFactory(String)
- Returns:
- kind of the facet
-
getModule
@NotNull SModule getModule()
The owning module TODO @deprecated facet is supposed to be a simple primitive flags storage. To extend module functionality one has two more ways: TODO extend from one of the SModule subclasses or implement a custom aspect
-
save
void save(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.
-
load
void load(Memento memento)
Allows the model root to read its previously saved configuration information
-
-