Folding Blocks of Code in JSP, XML, and HTML Files
See Also
For some types of files, you can use the code folding feature to collapse blocks of
code so that only the first line of the block appears in the Source Editor.
For JSP, XML, and HTML files, you can fold:
- JSP and HTML tags
- XML elements
- JSP directives
- JSP comments
- HTML comments
- JSP scriptlets
- JSP declarations
To fold code in a JSP, XML, or HTML file:
- Look for the collapse icon (
) to the left of the first
line of the block. A vertical line extends from the collapse icon to the
bottom of the foldable code.
- Click the collapse icon.
- Alternatively, right-click in the code in the Source Editor and choose
Collapse Fold (Ctrl-NumPad -), Collapse All (Ctrl-Shift-NumPad -), Collapse
All Comments, or Collapse All Scripting from the Code Folds menu.
To unfold code in a file:
- Look for the expand icon
(
) to the left of the code
block.
- Click the expand icon.
- You can choose a command from the View > Code Folds menu to
fold or unfold multiple blocks of code.
To disable code folding:
- Choose Tools > Options and click Editor.
- On the General tab, deselect the Code Folding Enabled checkbox.
- Click OK to close the Options window.
- See Also
- Creating an HTML File
- Creating a JSP File
- About JSP Syntax
- Editing a JSP File
- Compiling a JSP File
- Folding Blocks of Code in Java Files
- Configuring the Source Editor
Legal Notices