blob: 7028c236d39afda5e4b1b8cca507b9104c2ffb21 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
*
* 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:
* IBM Corporation - initial API and implementation
* Bjorn Freeman-Benson - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.examples.ui.pda.editor;
import java.util.ResourceBundle;
import org.eclipse.jface.action.IAction;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
import org.eclipse.ui.texteditor.ContentAssistAction;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
/**
* PDA editor
*/
public class PDAEditor extends AbstractDecoratedTextEditor {
/**
* Creates a PDE editor
*/
public PDAEditor() {
super();
setSourceViewerConfiguration(new PDASourceViewerConfiguration());
setRulerContextMenuId("pda.editor.rulerMenu"); //$NON-NLS-1$
setEditorContextMenuId("pda.editor.editorMenu"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
*/
@Override
protected void createActions() {
super.createActions();
ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.debug.examples.ui.pda.editor.PDAEditorMessages"); //$NON-NLS-1$
IAction action = new ContentAssistAction(bundle, "ContentAssistProposal.", this); //$NON-NLS-1$
action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
setAction("ContentAssistProposal", action); //$NON-NLS-1$
}
}
|