cornercorner
FeaturesPluginsDocs & SupportCommunityPartners



Formatting code


The Editor provides several features that make it easier for you to create well-formatted and easy-to-read code.

When you type a line of code in the Editor and press ENTER, the next line is automatically indented according to its hierarchy in the code. However, you can easily modify the indents with keyboard shortcuts:

  • CTRL+t - to increase line or block indentation.
  • CTRL+d - to decrease line or block indentation

In both cases, if nothing is selected, the whole line is shifted one tab stop. If a block of text is selected, those lines are all shifted.

If you have made changes to the formatting of a file and would like to go back to the default formatting, use the Ctrl+Shift+f keyboard shortcut or right-click in the Editor window and choose Reformat Code. If no text is selected when you choose this command, the whole file will be formatted. Otherwise, the selected lines are reformatted.

There are several configurable options for formatting of automatically generated code. See Formatting options.


Contents Prev Next
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems