SyntaxHighlightingInNetBeans

Syntax Highlighting in the NetBeans IDE

Document Status Initial Draft

</span>error This is living document. Some parts of it are still unwritten.
Note: This document is a subject to changes.
If you are interested in changes in this document you might want to sign to this page RSS feed. You can find the feed icon for the page on the Page Info tab or use this link. }}

Contents


Introduction

This document integrates approaches of the Syntax Highlighting used in the NetBeans Plugins that support various languages.

Current version of the document covers the following plugins:
  • Java
  • JavaFX

Default Typeface

A typeface named as default is used as a basis for extension by all other typefaces. The default typeface has the following characteristics by default:

  • foreColor="black"
  • bgColor="white"
  • font size="13"

Example of the default typeface:


default }}



Syntax Highlighting

The table below explains approaches of the syntax highlighting across plugins.

Primary
Category
Default 1 Java 2 JavaFX 3
char foreColor="ffCE7B00" name="character" XXXXXXXXXXXXXXXXXXXX
comment foreColor="ff969696" name="comment" name="comment"
error waveUnderlined="red" name="errors" name="error"
format XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX default="string"
font style="bold"
i18n-artifact XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX default="string"
font style="bold+italic"
identifier default name="identifier" name="identifier"
keyword foreColor="ff0000E6" name="keyword" name="keyword"
keyword-directive XXXXXXXXXXXXXXXXXXXX default="keyword" default="keyword"
font style="bold"
keyword-literal XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX default="identifier"
font style="bold"
literal XXXXXXXXXXXXXXXXXXXX default="keyword" XXXXXXXXXXXXXXXXXXXX
number foreColor="black" name="number" name="number"
operator default name="operator" name="operator"
separator default name="separator" name="separator"
string foreColor="ffCE7B00" name="string" name="string"
time XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX foreColor="magenta" default="default"
whitespace foreColor="black" name="whitespace" default="whitespace"
OO Languges
field foreColor="ff009900"
default="identifier"
method default="identifier"
Tag based languages
markup-element default="keyword"
markup-attribute default="field"
entity-reference foreColor="black"
font style="bold"


and the javafx.editor/src/org/netbeans/modules/javafx/dataloader/resources/NetBeans-JavaFX-fontsColors.xml file. Note, it is proposal, but not a final implementation.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo