org.eclipse.xtext.ui.editor.model
Class TerminalsTokenTypeToPartitionMapper
java.lang.Object
org.eclipse.xtext.ui.editor.model.TokenTypeToStringMapper
org.eclipse.xtext.ui.editor.model.TerminalsTokenTypeToPartitionMapper
- All Implemented Interfaces:
- ITokenTypeToPartitionTypeMapper
- Direct Known Subclasses:
- TokenTypeToPartitionMapper
public class TerminalsTokenTypeToPartitionMapper
- extends TokenTypeToStringMapper
- implements ITokenTypeToPartitionTypeMapper
- Author:
- Sven Efftinge - Initial contribution and API
Method Summary |
protected java.lang.String |
calculateId(java.lang.String tokenName,
int tokenType)
|
java.lang.String |
getPartitionType(int antlrTokenType)
returns the partition type for the given antlr type |
java.lang.String[] |
getSupportedPartitionTypes()
returns all supported partition types |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMMENT_PARTITION
public static final java.lang.String COMMENT_PARTITION
- See Also:
- Constant Field Values
SL_COMMENT_PARTITION
public static final java.lang.String SL_COMMENT_PARTITION
- Since:
- 2.0
- See Also:
- Constant Field Values
STRING_LITERAL_PARTITION
public static final java.lang.String STRING_LITERAL_PARTITION
- See Also:
- Constant Field Values
SUPPORTED_PARTITIONS
protected static final java.lang.String[] SUPPORTED_PARTITIONS
TerminalsTokenTypeToPartitionMapper
public TerminalsTokenTypeToPartitionMapper()
getPartitionType
public java.lang.String getPartitionType(int antlrTokenType)
- Description copied from interface:
ITokenTypeToPartitionTypeMapper
- returns the partition type for the given antlr type
- Specified by:
getPartitionType
in interface ITokenTypeToPartitionTypeMapper
calculateId
protected java.lang.String calculateId(java.lang.String tokenName,
int tokenType)
- Specified by:
calculateId
in class TokenTypeToStringMapper
getSupportedPartitionTypes
public java.lang.String[] getSupportedPartitionTypes()
- Description copied from interface:
ITokenTypeToPartitionTypeMapper
- returns all supported partition types
- Specified by:
getSupportedPartitionTypes
in interface ITokenTypeToPartitionTypeMapper