Java Reference
In-Depth Information
Java package structure. An exam-
ple
Packages
view is shown in fig-
ure 4.20.
4.5.2
Configuring the Project window
The options toolbar (see figure 4.21)
along the top of the
Project
window
lets you filter the
Project
views to
your liking. These settings are saved
along with your project and restored
each time you open it. Note that
some of the options aren't relative
for all views.
Flattening packages
The
Flatten Packages
option re-
moves the hierarchy from your pack-
age structure and collapses package
families into their flattened form, as
you might see them referenced with
the code itself. As you can see in fig-
ure 4.22, this view is much more
compact then the hierarchical view,
allowing you to fit more packages
within the view than normal. In the
Project
view, this only affects library
entries; source directories remain in
their file-system structure.
Figure 4.20 The Project tool window, navigating in
package mode. In this view, the boundaries and
divisions of disparate modules, directories, and
libraries are hidden. It shows the project strictly as a
set of packages and classes.
Showing and hiding
middle packages
The
Hide Empty Middle Pack-
ages
option, available only when
the
Flatten Packages
option is en-
gaged, eliminates an empty pack-
age hierarchy. For example, if all
your classes reside in the
com.
acme.conversion.currency
package,
Figure 4.21 The Project tool window's options
toolbar includes these buttons: Flatten Packages,
Hide Empty Middle Packages, Show Members,
Autoscroll to Source, Autoscroll from Source, Show
Structure, Show Modules, and Show Libraries
Contents. Most tool windows use a toolbar control like
this for setting and unsetting options.