blob: 467be5318d49af21039ba4b9c6981e9e88f720bd (
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
34
35
36
37
|
/*******************************************************************************
* Copyright (c) 2000, 2016 Red Hat Inc. and others.
* 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:
* Sopot Cela, Mickael Istria (Red Hat Inc.) - initial implementation
*******************************************************************************/
package org.eclipse.ui.internal.genericeditor;
import org.eclipse.ui.editors.text.TextEditor;
/**
* A generic code editor that is aimed at being extended by contributions. Behavior
* is supposed to be added via extensions, not by inheritance.
*
* @since 1.0
*/
public class ExtensionBasedTextEditor extends TextEditor {
private static final String CONTEXT_ID = "org.eclipse.ui.genericeditor.genericEditorContext"; //$NON-NLS-1$
/**
*
*/
public ExtensionBasedTextEditor() {
setSourceViewerConfiguration(new ExtensionBasedTextViewerConfiguration(this, getPreferenceStore()));
}
@Override
protected void setKeyBindingScopes(String[] scopes) {
super.setKeyBindingScopes(new String[] { CONTEXT_ID });
}
}
|