Package jetbrains.mps.extapi.module
Class ModuleFacetBase
- java.lang.Object
 - 
- jetbrains.mps.extapi.module.ModuleFacetBase
 
 
- 
- All Implemented Interfaces:
 SModuleFacet
- Direct Known Subclasses:
 CustomGenerationModuleFacet,DumbIdeaPluginFacet,JavaModuleFacetImpl,TestsFacetImpl
public abstract class ModuleFacetBase extends Object implements SModuleFacet
Base class for all module facets. 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedModuleFacetBase(String facetType) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattach()protected voidcheckNotRegistered()voiddispose()StringgetFacetPresentation()StringgetFacetType()Identity of the facet, seeFacetsFacade.getFacetFactory(String)SModulegetModule()The owning module TODO @deprecated facet is supposed to be a simple primitive flags storage.booleanisRegistered()voidload(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.booleansetModule(SModule module)FIXME javadoc @return and do we need both setModule + attach? Returns null if the facet cannot work within the passed module. 
 - 
 
- 
- 
Method Detail
- 
getFacetType
@NotNull public final String getFacetType()
Description copied from interface:SModuleFacetIdentity of the facet, seeFacetsFacade.getFacetFactory(String)- Specified by:
 getFacetTypein interfaceSModuleFacet- Returns:
 - kind of the facet
 
 
- 
getFacetPresentation
public String getFacetPresentation()
 
- 
getModule
@NotNull public SModule getModule()
Description copied from interface:SModuleFacetThe 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- Specified by:
 getModulein interfaceSModuleFacet
 
- 
setModule
public boolean setModule(SModule module)
FIXME javadoc @return and do we need both setModule + attach? Returns null if the facet cannot work within the passed module. 
- 
checkNotRegistered
protected void checkNotRegistered()
 
- 
isRegistered
public boolean isRegistered()
 
- 
attach
public void attach()
 
- 
dispose
public void dispose()
 
- 
save
public void save(Memento memento)
Description copied from interface:SModuleFacetGives the module facet the opportunity to persist into the supplied memento whatever configuration information may be needed to restore the models in the future.- Specified by:
 savein interfaceSModuleFacet
 
- 
load
public void load(Memento memento)
Description copied from interface:SModuleFacetAllows the model root to read its previously saved configuration information- Specified by:
 loadin interfaceSModuleFacet
 
 - 
 
 -