Java Reference
In-Depth Information
Context sensitive help
IDEA now provides language and syntax assistance for HTML , JavaScript, and CSS
elements, as it does for Java (see figure 11.25). Help is provided in a format of
Quick Documentation lookup, which appears inline when you press Ctrl+Q with
a tag, symbol, or attribute selected. This command is also available from the View
menu. The Quick Documentation pop-up offers a brief summary of the symbols
usage and, if applicable, links to related tags or properties.
The source of the assistance in this case isn't JavaDoc; it's the relevant W3C or
ECMA specification. HTML files have context-sensitive help for both tags and
attributes; CSS files offer help for individual style properties as well as the tags
used in selectors; and JavaScript for the core language and the W3C Document
Object model API . For help on a property, you can request help anywhere on the
line, including in the property value assignment and in <style> blocks and style
attributes in HTML .
IDEA can also offer assistance about attributes available for a particular HTML
tag. While the cursor is positioned inside the tag, select View | Parameter Info or
press Ctrl+P to view a pop-up listing the available attributes. Required attribut-
ers appear in a bold font.
Code completion
IDEA 's code-completion capabilities have also been enhanced to support these
new formats. To access code completion, position the cursor and use the Code |
Complete Code | Basic command ( Ctrl+Space ) just as you would for Java code.
You can complete tag names, attribute names, JavaScript symbols, CSS proper-
ties, style class and ID values, and more. Closing tags, parentheses, and braces
are also automatically added, but these can be disabled or tweaked in the Code
Figure 11.25 IDEA's context-sensitive help brings the CSS and HTML
specifications into your source code.
 
 
 
 
Search WWH ::




Custom Search