O'Reilly logo

Rich Client Programming: Plugging into the NetBeans Platform by Geertjan Wielenga, Jaroslav Tulach, Tim Boudreau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter ThirteenSyntax Highlighting

13.1. Introduction

One of the central features of an editor is its ability to distinguish between different elements of a language. For example, by default the IDE displays all Java keywords in blue, while method names are shown in black. This enhances the readability of Java code by giving each element a distinct and consistent appearance. The NetBeans API that lets you build and maintain a list of tokens is org.netbeans.api.lexer. A token is a related sequence of characters. For example, one token may be a sequence of characters that makes up a Java keyword; another, a sequence of characters making up a method name.

Where Are the Lexer Modules?

The Lexer modules, which provide the functionality discussed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required