Java Reference
In-Depth Information
Understanding excluded folders
Excluded paths let you hide certain folders from IDEA . Files in folders desig-
nated as excluded aren't parsed, watched, searched, or compiled by IDEA . Typi-
cal candidates are temporary build folders, generated output, logs, and other
project output.
You can use the Compiler settings control panel to hide individual files
or folders from the compiler without excluding them from the rest of
IDEA . Doing so makes it possible to have source folders that are parsed
and accessible for editing without having to compile them.
TIP
Configuring folders within the content root folder
The right panel of the dialog in figure 4.13 is used to locate and manage folder
allocations within the content root folders. Selecting a content root item in the list
shows the corresponding folder structure on the right side. To add a folder to the
content root, click to select the folder in the panel, and then click the folder type
button: Excluded , Sources , or Te s t S o u rc e s . The folder is added to the current
content root folder selected, and its color is updated to reflect its status. You can
remove folder items from the content root folder by clicking the cross button to
the right of the folder items.
You can do most of the actions of adding and removing folders from the
content root item in the right panel. Right-clicking a folder displays a list
of options that define what type of folder the selection can become. Se-
lecting the same option again returns it to normal folder status. As an ex-
tra bonus, you can add new folders to the project by right-clicking and
selecting the New Folder option.
TIP
Configuring source folders
Adding and removing source folders may be all that most projects require. How-
ever, because source folders are known to hold Java source files, the smart people
at JetBrains have taken things a step further. Typically, source files exist in a sub-
directory that matches their package structure, and thus source and test source
directories are assumed to map to the default package. Some people think that's
overkill for a module that specifies a single package that's deeply nested. Rather
than create an arbitrarily deep directory structure to satisfy this convention, IDEA
lets you specify a package root prefix, which means the package tree in that direc-
tory starts in the package you define and not the default package. In figure 4.13,
the testing source directory is using a package root prefix.
 
 
 
 
 
Search WWH ::




Custom Search