Example - RCP Text Editor
The RCP Text Editor Example shows how to create a text editor for an RCP application.
Features demonstrated by the example RCP text editor
- creating a simple text editor application along the lines of the eclipse.org RCP tutorial,
- implementation of a basic text editor based on
- implementation of a document provider based on
AbstractDocumentProvider that operates on
IPath as editor input,
- adding the most common actions to the application menu and toolbar,
- adding a simple xml editor based on the eclipse example project, offering syntax highlighting.
TextEditorApplication - an application to be run, see the eclipse.org RCP tutorial for more details.
TextEditorPerspective - a default perspective to be opened, see the eclipse.org RCP tutorial for more details.
TextEditorWorkbenchAdvisor - configures the basic workbench behavior: top level window style, title and icon.
TextEditorActionBarAdvisor - creates the actions typically seen in a text editor and sets up the menu and toolbar.
OpenFileAction - action to open a file, which is not present as such in the eclipse IDE. The code is copied and modified from
SimpleEditor - a simple text editor. All it does is setting the document provider and removing the smart insert mode.
SimpleDocumentProvider - a simple document provider that takes
IPath as editor input elements. It can open and save to files pointed to by
IPaths. It also simplifies the read-only / state validation for basic usage without version control.
PathEditorInput - an editor input implementing
This package is copied as is from the example editor available from eclipse. The only thing that was changed are to let
XMLDocumentProvider inherit from
plugin.xml manifest adds the application, the perspective, the two editors and the open action.