IntelliJ IDEA 13.1.0 Web Help

IntelliJ IDEA makes it possible to create packages under the source rootSource or test rootTest roots, using the Project tool window. The packages are marked with the iconPackage icon.

Besides that, it is possible to add package information file to package.

In this section:

To create a new package
  1. Select the destination node in the Project tool window.
  2. Do one of the following:
    • On the main menu, choose File | New | Package
    • On the context menu of the selection, choose New | Package
    • Press Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertCtrl+N or Alt+InsertAlt+InsertAlt+InsertCommand N or Control EnterControl N or Control EnterCommand N or Control Enter, and then choose choose Package.
  3. In the New Package dialog box, specify the package name and click OK.
13.0+
To create a package information file
  1. Select a package in the Project tool window.
  2. Do one of the following:
    • On the main menu, choose File | New | package-info.java
    • On the context menu of the selection, choose New | package-info.java
    • Press Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertCtrl+N or Alt+InsertAlt+InsertAlt+InsertCommand N or Control EnterControl N or Control EnterCommand N or Control Enter, and then choose choose package-info.java.

The package-info.java file is created according to the file template:

package_info

Familiarize yourself with the package-info.java template and its variables in the File and Code Templates page of the Settings dialog.

See Also

Procedures:

Reference:

Web Resources: