Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e512388fe973199f96f49f9657f69cb19eaa8313 (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
32
33
/*******************************************************************************
 * 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

import org.eclipse.xtext.ui.editor.doubleClicking.DoubleClickStrategyProvider
import org.eclipse.jface.text.source.ISourceViewer
import org.eclipse.xtext.ui.editor.doubleClicking.FixedCharCountPartitionDoubleClickSelector

import static org.eclipse.etrice.core.common.ui.editor.model.BaseTokenTypeToPartitionMapper.*

class BaseDoubleClickStrategyProvider extends DoubleClickStrategyProvider {
	
	override getStrategy(ISourceViewer sourceViewer, String contentType, String documentPartitioning) {
		switch contentType {
			case CCSTRING_LITERAL_PARTITION: return new FixedCharCountPartitionDoubleClickSelector(documentPartitioning, 0, 0)
			default: return new FixedCharCountPartitionDoubleClickSelector(documentPartitioning, 0, 0)
		}
	}
	
}
	

Back to the top