Properties for formatting Java source code

back to index

The following properties are available when formatting java source code. For information about how to change their values, please see this page.

 

Comments

The commentStyle property specifies the CSS class name applied to single-line comments ( // comment). The default value is "comment". The standard skins render it in the following way:

Eclipse Netbeans Monochrome Citylights
// comment // comment // comment
// comment

 

 

Block comments ( /* ... */ ) use the style specified by the blockComment property. The default value is "block-comment"

Eclipse Netbeans Monochrome Citylights
/* block */ /* block */ /* block */ /* block */

 

 

 

Finally, javadoc comments or other comments that provide metadata ( /** ... */ ) use the style specified by the docComment property. The default value is "adoc-comment".

Eclipse Netbeans Monochrome Citylights
/** javadoc*/ /** javadoc */ /** javadoc */ /** javadoc */

 

Identifiers

The identifierStyle property specifies the CSS class name applied to identifiers. The default value is "identifier". Remember that an identifier are basically all names - names of methods, of classes, of enumerations, of fields, etc.., whether they are defined by you (MySpectacularClass) or included in the standard library (String, Integer)

Eclipse Netbeans Monochrome Citylights
identifier identifier identifier identifier

 

 

Keywords

The keywordStyle property specifies the CSS class name applied to keywords. The default value is "keyword".

Eclipse Netbeans Monochrome Citylights
class class class class

 

 

Numbers

The numberStyle property specifies the CSS class name applied to numeric literals. The default value is "number".

Eclipse Netbeans Monochrome Citylights
3.141592 3.141592 3.141592 3.141592

 

 

Strings

The stringStyle property specifies the CSS class name applied to string literals. The default value is "string"

Eclipse Netbeans Monochrome Citylights
"Hello" "Hello" "Hello" "Hello"

 

 

Booleans

The booleanStyle property specifies the CSS class name applied to boolean literals. The default value is "boolean"

Eclipse Netbeans Monochrome Citylights
true true true true

 

 

Null values

The nullStyle property specifies the CSS class name applied to the null literal. The default value is "null"

Eclipse Netbeans Monochrome Citylights
null null null null

 

 

Operators

The operatorStyle property specifies the CSS class name applied to operators. The default value is "operator"

Eclipse Netbeans Monochrome Citylights
++ -- >>= ++ -- >>= ++ -- >>= ++ -- >>=