blob: 0f7ce64cada97487299ffd084940cbc7b02ec114 (
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 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
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)
}
}
}
|