public class TerminalsTokenTypeToPartitionMapper extends TokenTypeToStringMapper implements ITokenTypeToPartitionTypeMapper, ITokenTypeToPartitionTypeMapperExtension
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMENT_PARTITION |
static String |
SL_COMMENT_PARTITION |
static String |
STRING_LITERAL_PARTITION |
protected static String[] |
SUPPORTED_PARTITIONS |
| Constructor and Description |
|---|
TerminalsTokenTypeToPartitionMapper() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
calculateId(String tokenName,
int tokenType) |
String |
getPartitionType(int antlrTokenType)
returns the partition type for the given antlr type
|
String[] |
getSupportedPartitionTypes()
returns all supported partition types
|
boolean |
isMultiLineComment(String partitionType)
Returns true of the given partitionType is to be treated as
as a multi line comment.
|
boolean |
isSingleLineComment(String partitionType)
Returns true of the given partitionType is to be treated as
as a single line comment.
|
getMappedValue, initIds, setTokenDefProviderpublic static final String COMMENT_PARTITION
public static final String SL_COMMENT_PARTITION
public static final String STRING_LITERAL_PARTITION
protected static final String[] SUPPORTED_PARTITIONS
public String getPartitionType(int antlrTokenType)
ITokenTypeToPartitionTypeMappergetPartitionType in interface ITokenTypeToPartitionTypeMapperprotected String calculateId(String tokenName, int tokenType)
calculateId in class TokenTypeToStringMapperpublic String[] getSupportedPartitionTypes()
ITokenTypeToPartitionTypeMappergetSupportedPartitionTypes in interface ITokenTypeToPartitionTypeMapperpublic boolean isMultiLineComment(String partitionType)
ITokenTypeToPartitionTypeMapperExtensionisMultiLineComment in interface ITokenTypeToPartitionTypeMapperExtensionDefaultFoldingRegionProvider.computeCommentFolding(org.eclipse.xtext.ui.editor.model.IXtextDocument, org.eclipse.xtext.ui.editor.folding.IFoldingRegionAcceptor<org.eclipse.xtext.util.ITextRegion>),
SmartLineStartAction in XtextEditor,
XtextSpellingReconcileStrategypublic boolean isSingleLineComment(String partitionType)
ITokenTypeToPartitionTypeMapperExtensionisSingleLineComment in interface ITokenTypeToPartitionTypeMapperExtensionSmartLineStartAction in XtextEditor,
XtextSpellingReconcileStrategyCopyright © 2016. All Rights Reserved.