Java Reference
In-Depth Information
you visualize the hierarchy of structure in the file and also allows quick navigation
to its various components. Click any element to jump to its source. (Navigation
control can be configured using the structure view toolbar.) The HTML view is a
hierarchical tree of the page structure, the JavaScript structural view is a list of all
the functions and variables defined in the file, and the CSS view is more or less a
list of each the selectors specified by the file.
Go to declaration
This action works the same as it does with Java files. Selecting a symbol and exe-
cuting Go To | Declaration ( Ctrl+B ) takes you to the symbol's initial definition,
even if it's defined in another file. This feature works in the expected places in
HTML , CSS , and JavaScript files, including
JavaScript function calls, variables, and parameters
HTML tags (takes you to the XHTML schema)
References to external files through src and href attributes (anchors,
styles, scripts, and so on)
Stylesheet references through HTML tag id or class attributes
If you do a lot of HTML work for web site design, you will find the new
Image Viewer helpful. It lets you view images directly in the IDEA editor.
It even works in HTML image tags. Click the image reference, and then
select Go To | Declaration ( Ctrl+B ). This is a good way to verify that an
image you reference is the image you think it is!
TIP
Open in Browser
The Open in Browser feature lets you easily preview the currently open HTML
file in the browser specified in the General settings panel. If all paths and refer-
ences in the file are relative to the file location, you're able to view the file as it is.
If paths are specified via aliased paths, references to the corresponding files may
appear broken. (Note that this feature is just for quick general preview.) To view
the file, select the Open in Browser command from the View or pop-up menu.
11.5.5
Refactoring web content
In addition to all the editor-related features already discussed, several refactor-
ing operations can be applied to HTML , CSS , or JavaScript files. The first two,
Move and Rename , work similarly to the way they do with other types of files.
When you perform one of these refactorings, IDEA automatically corrects all
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search