blob: 53bdc1568e488656b3e3a58ec1a6d4275daf8768 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*******************************************************************************
* Copyright (c) 2011 protos software gmbh (http://www.protos.de).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* CONTRIBUTORS:
* Juergen Haug (initial contribution)
*
*******************************************************************************/
package org.eclipse.etrice.core.common.ui.editor.model
import org.eclipse.xtext.ui.editor.model.TerminalsTokenTypeToPartitionMapper
class BaseTokenTypeToPartitionMapper extends TerminalsTokenTypeToPartitionMapper {
public val static String CCSTRING_LITERAL_PARTITION = "__ccstring";
override protected calculateId(String tokenName, int tokenType) {
switch tokenName {
// custom behavior for ccstring
case 'RULE_CC_STRING': CCSTRING_LITERAL_PARTITION
default: super.calculateId(tokenName, tokenType)
}
}
}
|