Package jetbrains.mps.util
Class MacrosFactory
- java.lang.Object
 - 
- jetbrains.mps.util.MacrosFactory
 
 
- 
- All Implemented Interfaces:
 MacroHelper.Source
public final class MacrosFactory extends Object implements MacroHelper.Source
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringLIB_EXTstatic StringMODULEstatic StringMPS_HOMEstatic StringMPS_HOME_MACRO_NAMEstatic StringPLATFORM_LIBstatic StringPROJECT_LEGACY 
- 
Constructor Summary
Constructors Constructor Description MacrosFactory() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleancontainsMacro(String path)Checks whetherpathcontains a macro.static MacroHelperforModule(AbstractModule module)Deprecated.why would anyone care to cast openapi.SModule to AbstractModule? UseforModule(SModule)instead.static MacroHelperforModule(SModule module)static MacroHelperforModuleFile(IFile moduleFile)static MacroHelperforProjectFile(IFile projectFile)static MacroHelpergetGlobal()MacroHelperglobal()MacroHelpermodule(SModule m)MacroHelpermoduleFile(IFile f)MacroHelperprojectFile(IFile f) 
 - 
 
- 
- 
Field Detail
- 
MODULE
public static final String MODULE
- See Also:
 - Constant Field Values
 
 
- 
PROJECT_LEGACY
public static final String PROJECT_LEGACY
- See Also:
 - Constant Field Values
 
 
- 
MPS_HOME_MACRO_NAME
public static final String MPS_HOME_MACRO_NAME
- See Also:
 - Constant Field Values
 
 
- 
MPS_HOME
public static final String MPS_HOME
- See Also:
 - Constant Field Values
 
 
- 
PLATFORM_LIB
public static final String PLATFORM_LIB
- See Also:
 - Constant Field Values
 
 
- 
LIB_EXT
public static final String LIB_EXT
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
global
@NotNull public MacroHelper global()
- Specified by:
 globalin interfaceMacroHelper.Source
 
- 
module
@NotNull public MacroHelper module(SModule m)
- Specified by:
 modulein interfaceMacroHelper.Source
 
- 
moduleFile
@NotNull public MacroHelper moduleFile(IFile f)
- Specified by:
 moduleFilein interfaceMacroHelper.Source
 
- 
projectFile
@NotNull public MacroHelper projectFile(IFile f)
- Specified by:
 projectFilein interfaceMacroHelper.Source
 
- 
forModuleFile
public static MacroHelper forModuleFile(IFile moduleFile)
 
- 
forModule
@NotNull public static MacroHelper forModule(SModule module)
 
- 
forModule
@Deprecated public static MacroHelper forModule(AbstractModule module)
Deprecated.why would anyone care to cast openapi.SModule to AbstractModule? UseforModule(SModule)instead. 
- 
forProjectFile
public static MacroHelper forProjectFile(IFile projectFile)
 
- 
getGlobal
public static MacroHelper getGlobal()
 
- 
containsMacro
public static boolean containsMacro(@NotNull String path)
Checks whetherpathcontains a macro.- Parameters:
 path- a non-null string- Returns:
 trueifpathstarts with "${" and contains "}",falseotherwise. FIXME AP contains or equals? Does MacroHelpers and others replace macros in the middle of a path?
 
 - 
 
 -