Standard Widget Toolkit (SWT) Standalone Example - Java Syntax Viewer

Introduction

This example demonstrates how to implement a user-defined line styler for the StyledText widget.

Running the example

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.

Details

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.

Copyright IBM Corporation 2000, 2001.  All Rights Reserved.