Class SmartAliasHelper
- java.lang.Object
 - 
- jetbrains.mps.smodel.presentation.SmartAliasHelper
 
 
- 
public class SmartAliasHelper extends Object
This class provides operations with the alias which matches the smart pattern. The smart pattern is 'xxx_<{_smart_referent_role_}>_yyy' Concept which has smart conceptAlias and reference link with role equals to the smart role derived from the alias is "smart concept" 
- 
- 
Constructor Summary
Constructors Constructor Description SmartAliasHelper(String alias) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPresentation(String roleReplacement)StringgetSmartRole()booleanisSmartAlias()StringreplaceRole(String roleReplacement) 
 - 
 
- 
- 
Method Detail
- 
isSmartAlias
public boolean isSmartAlias()
- Returns:
 - true if the alias matches the smart pattern
 
 
- 
getSmartRole
@Nullable public String getSmartRole()
- Returns:
 - smart referent role derived from the alias if the alias is smart. Otherwise return null.
 
 
- 
getPresentation
public String getPresentation(String roleReplacement)
- Parameters:
 roleReplacement- string to replace smart referent role in the presentation- Returns:
 - 'xxx_roleReplacement_yyy' if the pattern is smart. Otherwise return roleReplacement.
 
 
 - 
 
 -