Tree View

Overview.  When using the project facility, the navigator pane on the left hand side of the DrJava window displays the files in a tree view, giving you a graphical representation of where the project files are located in the project directories. Files are organized into three main branches: Source Files, Auxiliary Files, and External Files. The exact characteristics of each of these branches will be described in the following paragraphs.

Some of the menu items behaviors change slightly when a project is open. The "Compile All" button will compile only project Source Files instead of every open file. Likewise, "Test All" will only test the files that are in the "Source Files" and "Auxiliary Files" branches. You can manually compile or test the other branches by right clicking on the folder and selecting "Compile Folder" or "Test Folder" respectively.

Only one project can be opened at a time.

Source Files. A file is categorized as a Source File if it is located at or below the directory in which the project file is saved. We call the directory that the project file is saved the "project directory." This means that the location of the project file in your filesystem will determine which Java files will be considered part of your project.

External Files. Files located outside of the project directory will automatically be added to the External Files branch. External Files are not compiled or tested when you compile or test the project. Also, the list of external files that are currently open is not saved in your project file.

Included External Files. Included External Files are files that are located outside of the project's root directory and are explicitly added to the project. Included External Files are compiled and tested when the project is compiled or tested. Also, the list of Included External Files is saved to the project file when the project is saved. Included External Files will also be automatically opened when the project is opened. Only a file in External Files can be moved to the Included External Files branch.

To add an External File to the Included External Files branch, right click the filename in the External Files list and select the "Include With Project" option. To remove a file from the Included External Files, right click the filename and select the "Do Not Include With Project" option.