This example shows how to implement a user-defined line styler for the StyledText widget. The example provides a typical editor interface. To see the effect of the line styler, open a *.java file, and when the contents of the file are displayed in the editor area, notice that the keywords have been highlighted.
Follow the SWT standalone examples setup instructions to install and run the example from your workspace.
The "Main" class is org.eclipse.swt.examples.javaviewer.JavaViewer
.
This example can also be run using the Example Launcher. Select the Java Syntax Viewer item from the Standalone category and click Run.