Java Reference
In-Depth Information
4.3 Working with modules
Although the project may be the center of attention, the module does all the
work. Without a module, your project has no source code, no output, nothing
other than a collection of configuration preferences. Like projects, modules
often require alterations after their initial creation. Their participation in a
project, as well as their individual internal settings, is controlled through IDEA 's
Settings interface.
4.3.1
Managing project modules
Modules are managed from within the project's Paths settings panel. The list of
modules associated with the project is shown along the left side of the panel. IDEA
gives you options for adding, removing, and editing the list of modules.
Adding a new module to your project
When you create a new project, the project wizard gives you the opportunity to
define your first module as part of the project setup. Alternatively, to add new
modules after the initial project creation, select File | New Module . Either way,
the process is the same, beginning with the Add Module Wizard , shown later in
figure 4.9.
Importing a module into your project
In the first step of the Add Module Wizard you have two options: You can cre-
ate a new module from scratch or import an existing one into your project by
selecting the Import existing module radio button. Select the path to the mod-
ule's .IML file by either typing it in or clicking the ellipsis button to select it via
the file requestor.
When you import an existing module, you're really just adding a reference to
it. The module isn't copied into the project's root folder or altered in any way.
The module is always stored in a single location. This allows a single module to be
shared by multiple projects.
Since version 5.0, IntelliJ IDEA provides the ability to automatically convert
Eclipse and JB uilder projects into its own format.
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search