Once the project is set up, your files are accessible from both the Projects window and the Files window. Projects WindowThe Projects window (shown in Figure 3-6) is designed to be the center of operations for file creation, project configuration, and project building. The Projects window displays only the files that are likely to be regularly edited in a project, such as Java source files, web pages, and tests. Build outputs and project metadata are ignored. Figure 3-6. Projects window
Java sources are displayed according to package structure, which generally makes it easier to navigate to files because you do not have to navigate through nested folder hierarchies. The main node for each project has commands on its contextual (right-click) menu for compiling, running, debugging, creating Javadoc, and performing other project-related actions. Files WindowThe Files window displays your files organized according to file hierarchy, much as they appear in a file manager on your system. (One exception to this is that the .form files that are used to generate the design view of GUI classes that you create in the IDE's Form Editor are not displayed; just the .java file is displayed.) In addition to your sources, tests, and web files, project metadata and files produced when you build the project appear. See Figure 3-7. Figure 3-7. Files window
The Files window is useful if you need to browse the physical structure of your project, such as the contents of the JAR file (or other archive file) produced by the project. The Files window also provides direct access to project metadata files if you need to customize them. Otherwise, it is probably best to work in the Projects window, because project-related commands are not available in the Files window.
Fast Navigation Between the Projects and Files WindowsIf you are working with a node in one window but want to switch to that node in a different window, there are several keyboard shortcuts available to speed navigation. For example, if you have been working in the Projects window and now want to inspect the build script (which, in standard projects, is viewable through the Files window), you can jump straight to the project's node in the Files window without having to scroll to the node. See Table 3-2 for some of the shortcuts that are particularly useful for navigating between the "explorer"-style windows.
You can also use these shortcuts in the Source Editor when you want to jump to the node for that file. Physical Structure of IDE ProjectsThe Projects window provides a "logical" view of projects that is oriented toward coding activities and does not include all files in the project. For example, output files (such as compiled classes and JAR files), project metadata, and version control metadata files (if you are using version control) are hidden. If you want to see the actual files created in the project, open the Files window (by clicking the Files tab above the Projects window). When you create a general project (using a standard template), the IDE creates the following folders and files:
When you build your project, the following folders are added:
For web applications created from standard templates, the IDE creates the following folders and files:
When you build your project, the following folders are added:
|