|
File Opening, Closing, Saving & Printing
This section describes how individual source files (Java, HTML etc.) can be opened, saved, closed and printed. It also describes how to create a new source file. Further, this section discusses how you can drag & drop files into the IDE.
Open File To open the files of a project for editing, select the 'Files' tab. All the files within the project will be shown. Select one or more files and then press the 'Open' button below the file list. To select more than one file, hold down the Ctrl key when you click on the file names. Alternatively, you may simply double-click on a file to open it. A new editor tab pane will be opened for each source file. To graphically edit a panel or gui that was created with one of the IDE's Panel Builders, open the .panel or .gui file; to edit the Java source code, simply open the corresponding Java source code file. Note, however, that editing graphically in the Panel Builder will update (i.e. overwrite) any existing corresponding java source file, and that changes to the java source file will not appear in the graphical editor. Image files (gif and jpg) may also be opened - to view only.
Save and Save All You may save a source file at any time by selecting either the 'Save' option in the 'File' menu or the 'Save' button on the tool bar. TJI keeps track of which source files have been changed since being loaded or last saved. It will therefore prompt you to save any such source file if you opt to close that editor or exit the application. Files that need to be saved will have a red 'disk' indicator on the editor tab title. You may save all open source files at one time by selecting 'Save All' from the 'File' menu. When entering a file name, if an extension is not given the appropriate extension will automatically be added. TJI makes a backup of an existing Java source file before a new version is saved; these backup files are given the file extension '.jbak'. Only the immediately previous version is so named. TJI also automatically saves source files into a backup store every 20 minutes of editing activity. It keeps up to 10 backups for each source file. These backups can be viewed or retrieved by selecting the 'Revert' option in the 'Edit' menu. The backups are listed (and ordered) by date and time.
Save As Allows you to change a file's name and/or directory location. Ensure that Java file names match the class name in the source code. When using the 'Save As' option, if an entered file name already exists in the current directory, you will be asked to enter a different name or 'cancel'. It might be that 'Refactor Class' is what you need.
Close and Close All Editors can be closed when no longer required by selecting the 'Close' option in the 'File' menu. It is possible to close all the editors at one time by selecting the 'Close All' option in the 'File' menu. If any of the source files have been altered, they will be saved first, if automatic save is enabled (see the 'Options' menu) - otherwise you will be prompted on whether to save each file that has been changed.
Print File The contents of an editor can be printed by selecting 'Print' from the 'File' menu. Printing can be in color, with color syntax formatting and line numbers, just as you see it in the editor.
New File Creates a new file and opens it in a new editor. You can select the file type from the available options. When creating a new Java file, you may specify whether to create a framework (or 'skeleton') for a class, interface, servlet or tag handler, in which case a basic outline is prewritten into the new source file.
Drag & Drop of Files into the IDE You can select one or more files in another program - such as Windows Explorer - and drag those files into the IDE. You can drop onto any of the file tabs or point at the editor space. You then have the choice of adding the file(s) to the current project; adding to the project and also opening them in new editors; or opening the file(s) as non-project files.
Externally Modified Files If a source file is modified by another program while it is open for editing in the IDE, a dialog will appear asking if you wish to update the editor with the externally modified version, once focus returns to the IDE (note that a few seconds may pass before the dialog appears).
|