Package org.jetbrains.mps.openapi.module
Class FacetsFacade
- java.lang.Object
-
- org.jetbrains.mps.openapi.module.FacetsFacade
-
public abstract class FacetsFacade extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FacetsFacade.FacetFactory
-
Field Summary
Fields Modifier and Type Field Description protected static FacetsFacade
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protected
FacetsFacade()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract void
addFactory(String facetType, FacetsFacade.FacetFactory factory)
abstract void
callWhenFacetFactoryAppears(String facetFactoryType, Consumer<FacetsFacade.FacetFactory> callback)
for now it is only for internal useabstract Set<String>
getApplicableFacetTypes(Collection<SLanguage> usedLanguages)
For the given set of languages, returns a set of recommended (seeregisterLanguageFacet(SLanguage, String)
) facet types.abstract FacetsFacade.FacetFactory
getFacetFactory(String facetType)
abstract Set<String>
getFacetTypes()
Return set of all registered facet typesstatic FacetsFacade
getInstance()
Deprecated.Use respectiveComponentPlugin
(i.e.abstract void
registerLanguageFacet(SLanguage language, String facetType)
Associates a facet with a language.abstract void
removeFactory(FacetsFacade.FacetFactory factory)
abstract void
unregisterLanguageFacet(SLanguage language, String facetType)
-
-
-
Field Detail
-
INSTANCE
protected static FacetsFacade INSTANCE
-
-
Method Detail
-
getInstance
@Deprecated public static FacetsFacade getInstance()
Deprecated.Use respectiveComponentPlugin
(i.e.MPSCore
) to obtain instance of the registry.
-
getApplicableFacetTypes
public abstract Set<String> getApplicableFacetTypes(Collection<SLanguage> usedLanguages)
For the given set of languages, returns a set of recommended (seeregisterLanguageFacet(SLanguage, String)
) facet types.
-
registerLanguageFacet
public abstract void registerLanguageFacet(@NotNull SLanguage language, String facetType)
Associates a facet with a language. Allows MPS to advise a user to turn on the facet for modules using this language.
-
unregisterLanguageFacet
public abstract void unregisterLanguageFacet(@NotNull SLanguage language, String facetType)
-
getFacetFactory
@Nullable public abstract FacetsFacade.FacetFactory getFacetFactory(String facetType)
- Parameters:
facetType
- facet kind we intend to instantiate- Returns:
- factory, if found for the given facet type.
-
callWhenFacetFactoryAppears
public abstract void callWhenFacetFactoryAppears(@NotNull String facetFactoryType, @NotNull Consumer<FacetsFacade.FacetFactory> callback)
for now it is only for internal use
-
addFactory
public abstract void addFactory(@NotNull String facetType, FacetsFacade.FacetFactory factory)
-
removeFactory
public abstract void removeFactory(FacetsFacade.FacetFactory factory)
-
-