|
Re: Replacing STRING terminal/skip inserting closing terminal [message #1386662 is a reply to message #1386648] |
Thu, 19 June 2014 09:22 |
|
Hi,
it looks you have already found 99% of the code. the only part there the STRING rule is involved is
acceptor.accept(partitionEndSkippingEditStrategy.get(),TerminalsTokenTypeToPartitionMapper.STRING_LITERAL_PARTITION);
if we have a look at TerminalsTokenTypeToPartitionMapper we see
@Override
protected String calculateId(String tokenName, int tokenType) {
if ("RULE_ML_COMMENT".equals(tokenName)) {
return COMMENT_PARTITION;
} else if ("RULE_SL_COMMENT".equals(tokenName)) {
return SL_COMMENT_PARTITION;
} else if ("RULE_STRING".equals(tokenName)) {
return STRING_LITERAL_PARTITION;
}
return IDocument.DEFAULT_CONTENT_TYPE;
}
so the only place to customize is TerminalsTokenTypeToPartitionMapper and its clear what todo
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.05290 seconds