 |
RCP Text Editor Example
The RCP Text Editor Example is a simple RCP application that creates own text editors using the text editing infrastructure (an optional RCP component) and offers text editing capabilities such as shifting, moving and deleting lines, find/replace, auto-completion and basic syntax highlighting for markup languages. See also the documentation and implementation notes.
To run the example in binary form:
- Download the RCP Runtime Binary from the Eclipse Project downloads page and extract it to a folder such as
c:\texteditor-example. The eclipse subfolder of this location will be referenced as <install_dir> below.
- Download the Platform Text Binary and extract it into
<install_dir>/plugins subfolder.
- Download the RCP Text editor example plug-in and save it into the
<install_dir>/plugins subfolder.
- Replace the
<install_dir>/configuration/config.ini file with this one.
- Run the eclipse executable: For example, on Windows, run
<install_dir>/eclipse.exe.
To load the RCP text editor example source into your workspace:
- Download the texteditor source plug-in and save it on your harddisk.
- Choose File > Import... > Existing Project into Workspace.
- Click the Browse... button to select the zip file you downloaded in step 1.
- Press Finish.
To run the example from your workspace:
- Choose Run > Open Run Dialog...
- Under Run-time Workbench, there should be a new launch configuration: RCP Text Editor.
- Click Run.
- When the RCP Text Editor Example window opens, use File > Open to open a plain text, .xml, or .html file.
|
 |
Default Text Editor Example (requires R3.3 or later)
This example shows how to use the Eclipse Text editor in your RCP application. As mentioned above this
requires to add several additional plug-ins and hence increases the size of the resulting RCP application.
To run the example in binary form:
- Download the RCP Runtime Binary from the Eclipse Project downloads page and extract it to a folder such as
c:\texteditor-example. The eclipse subfolder of this location will be referenced as <install_dir> below.
- Download the Platform Runtime Binary from the Eclipse Project downloads page
and extract the following plug-ins into
<install_dir>/plugins:
org.eclipse.core.filebuffers
org.eclipse.core.filesystem + corresponding fragment
* org.eclipse.core.net
org.eclipse.core.resources + corresponding fragment
org.eclipse.jface.text
org.eclipse.text
org.eclipse.ui.editors
* org.eclipse.ui.forms
org.eclipse.ui.ide
* org.eclipse.ui.views
org.eclipse.ui.workbench.texteditor
* org.eclipse.update.core + corresponding fragment
* org.eclipse.update.ui
*) these plug-ins are not really needed but as they are not marked optional in the manifest of
org.eclipse.ui.ide and therefore we have to add them as well (see bug 198821 for details).
- Download the Text editor example plug-in and save it into the
<install_dir>/plugins subfolder.
- Replace the
<install_dir>/configuration/config.ini file with this one.
- Run the eclipse executable: For example, on Windows, run
<install_dir>/eclipse.exe.
To load the default Text editor example source into your workspace:
- Download the texteditor source plug-in and save it on your harddisk.
- Choose File > Import... > Existing Project into Workspace.
- Click the Browse... button to select the zip file you downloaded in step 1.
- Press Finish.
To run the example from your workspace:
- Choose Run > Open Run Dialog...
- Under Run-time Workbench, there should be a new launch configuration: RCP Text Editor.
- Click Run.
- When the RCP Text Editor Example window opens, use File > Open to open a plain text, .xml, or .html file.
|