Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: dac611794b354e3195ad575bd2a31fa9fb2f1c76 (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
30
31
/*******************************************************************************
 * 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 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * 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)
		}
	}

}

Back to the top