This example demonstrates how to implement a user-defined line styler for the StyledText widget.
If the Example Launcher is installed, select the Java Viewer item from the Standalone category and click Run.
Otherwise, install and run the example manually as per the
Standalone Examples Manual Setup instructions. The executable class is
org.eclipse.swt.examples.javaviewer.JavaViewer
.
The example provides a typical editor interface. To see the effect of the line styler, open a *.java file. When the contents of the file are displayed in the editor area, notice that the keywords have been highlighted.