Java Reference
In-Depth Information
Autoscroll to Source,
when enabled, causes single-clicking or selecting an
item in the list with the keyboard to take you to that item's definition in the
editor. (Double-clicking an item always takes you there, even if this option
is disabled.)
■
Autoscroll from Source
, when enabled, scrolls the
Structure
view to select
whatever method you're editing in the editor.
■
Viewing properties
The
Show Properties
button on the
Structure
view's toolbar lets you view your
class's properties, as seen through the JavaBean
API
. Any methods that follow the
JavaBean getter/setter conventions appear as properties when the class is
accessed via reflection in a JavaBean-aware container such as a
JSP
. For each prop-
erty, the name and type are shown under a property icon, along with its support-
ing access methods. This mode is useful if you're working with
JSP
tag libraries,
EJB
s, Swing components, or other types of Java classes that rely on the JavaBean
naming conventions to define properties. It can help you see the class as a clear
picture of what properties are available.
Viewing inherited members
Unless you enable the
Show Inherited Members
option on the
Structure
view's
toolbar, each class shows only the methods, fields, and other symbols explicitly
defined by it. Any inherited methods or fields don't appear in the structure view.
When this option is enabled, you see a more complete picture of the class; any
inherited fields or methods appear in a lighter color font with the name of their
originating class shown in parenthesis.
9.1.3
Exploring the code hierarchy
As with all object-oriented languages, Java code isn't typically flat. Through Java's
support for inheritance and interfaces, hierarchies are created to take advantage
of the efficiencies of object-oriented design.
IDEA
makes it easy to analyze and
navigate your code's hierarchies through the
Hierarchy
window.
Looking at class and interface hierarchies
You can visually inspect a class or interface's inheritance tree by executing the
View | Type Hierarchy
command (
Ctrl+H
). The hierarchy of the class you're
editing is displayed in the Hierarchy window, which by default slides out of the
right window bar (see figure 9.4).