View Javadoc

1   package org.eparapher.rcp.editors;
2   
3   import org.eclipse.ui.editors.text.TextEditor;
4   
5   /**
6    * A simple text editor.
7    * 
8    * @see org.eclipse.ui.examples.rcp.texteditor.editors.SimpleDocumentProvider
9    * @since 3.0
10   */
11  public class SimpleEditor extends TextEditor {
12  
13  	public SimpleEditor() {
14  		super();
15  		// make sure we inherit all the text editing commands (delete line etc).
16  		setKeyBindingScopes(new String[] { "org.eclipse.ui.textEditorScope" });  //$NON-NLS-1$
17  		internal_init();
18  	}
19  
20  	/**
21  	 * Initializes the document provider and source viewer configuration.
22  	 * Called by the constructor. Subclasses may replace this method.
23  	 */
24  	protected void internal_init() {
25  		configureInsertMode(SMART_INSERT, false);
26  		setDocumentProvider(new SimpleDocumentProvider());
27  	}
28  }