Package jetbrains.mps.util
Class NameUtil
- java.lang.Object
 - 
- jetbrains.mps.util.NameUtil
 
 
- 
public class NameUtil extends Object
 
- 
- 
Constructor Summary
Constructors Constructor Description NameUtil() 
- 
Method Summary
 
 - 
 
- 
- 
Method Detail
- 
satisfiesNamingPolicy
public static boolean satisfiesNamingPolicy(String s)
 
- 
satisfiesPartNamingPolicy
public static boolean satisfiesPartNamingPolicy(String s)
 
- 
formatNumericalString
public static String formatNumericalString(int quantity, String singular)
Return numerical string for given quantity of objects and singular form of object name. For example, for(5, "issue")returns"5 issues".- Parameters:
 quantity- quantity of counted objectssingular- singular form of counted objects- Returns:
 - numerical string
 
 
- 
conceptFQNameFromNamespaceAndShortName
public static String conceptFQNameFromNamespaceAndShortName(String namespace, String shortName)
 
- 
longNameFromNamespaceAndShortName
public static String longNameFromNamespaceAndShortName(String namespace, String name)
 
- 
getModelLongName
@Deprecated public static String getModelLongName(SModel model)
Deprecated.UseSModelName.getLongName()instead- Parameters:
 model- not null- Returns:
 - qualified name of the model without stereotype
 
 
- 
getModelLongName
@Deprecated public static String getModelLongName(SModelReference modelRef)
Deprecated.UseSModelName.getLongName()instead- Parameters:
 modelRef- not null- Returns:
 - qualified name of the model without stereotype
 
 
- 
compactModelName
public static String compactModelName(SModelReference ref)
 
- 
escapeChar
public static String escapeChar(char c)
 
- 
stripQuotes
public static String stripQuotes(String quotedString, String optionalOpenQuote, String optionalCloseQuote)
Strips optional quotes from the beggining and ending of the quotedString.- Parameters:
 quotedString- string to strip quotes.optionalOpenQuote- optional open quote. If quotedString starts with it then it will be stripped.optionalCloseQuote- optional close quote. If quotedString ends with it then it will be stripped.- Returns:
 - quotedString with stripped quotes.
 
 
 - 
 
 -