public class TerminalsTokenTypeToPartitionMapper extends TokenTypeToStringMapper implements ITokenTypeToPartitionTypeMapper, ITokenTypeToPartitionTypeMapperExtension
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMENT_PARTITION |
static java.lang.String |
SL_COMMENT_PARTITION |
static java.lang.String |
STRING_LITERAL_PARTITION |
protected static java.lang.String[] |
SUPPORTED_PARTITIONS |
Constructor and Description |
---|
TerminalsTokenTypeToPartitionMapper() |
Modifier and Type | Method and Description |
---|---|
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
|
boolean |
isMultiLineComment(java.lang.String partitionType)
Returns true of the given partitionType is to be treated as
as a multi line comment.
|
boolean |
isSingleLineComment(java.lang.String partitionType)
Returns true of the given partitionType is to be treated as
as a single line comment.
|
getMappedValue, initIds, setTokenDefProvider
public static final java.lang.String COMMENT_PARTITION
public static final java.lang.String SL_COMMENT_PARTITION
public static final java.lang.String STRING_LITERAL_PARTITION
protected static final java.lang.String[] SUPPORTED_PARTITIONS
public java.lang.String getPartitionType(int antlrTokenType)
ITokenTypeToPartitionTypeMapper
getPartitionType
in interface ITokenTypeToPartitionTypeMapper
protected java.lang.String calculateId(java.lang.String tokenName, int tokenType)
calculateId
in class TokenTypeToStringMapper
public java.lang.String[] getSupportedPartitionTypes()
ITokenTypeToPartitionTypeMapper
getSupportedPartitionTypes
in interface ITokenTypeToPartitionTypeMapper
public boolean isMultiLineComment(java.lang.String partitionType)
ITokenTypeToPartitionTypeMapperExtension
isMultiLineComment
in interface ITokenTypeToPartitionTypeMapperExtension
DefaultFoldingRegionProvider.computeCommentFolding(org.eclipse.xtext.ui.editor.model.IXtextDocument, org.eclipse.xtext.ui.editor.folding.IFoldingRegionAcceptor<org.eclipse.xtext.util.ITextRegion>)
,
SmartLineStartAction in XtextEditor
,
XtextSpellingReconcileStrategy
public boolean isSingleLineComment(java.lang.String partitionType)
ITokenTypeToPartitionTypeMapperExtension
isSingleLineComment
in interface ITokenTypeToPartitionTypeMapperExtension
SmartLineStartAction in XtextEditor
,
XtextSpellingReconcileStrategy