Java Reference
In-Depth Information
Auto-saving your changes
You have the option of letting IDEA save files for you on a regular basis. To enable
this auto-save option, bring up the General options of the IDE Settings . Select
the AutoSave files option, and specify the number of seconds of inactivity
required to trigger a save. Once this option is enabled, the editor will automati-
cally save any changes to your file after you stop using the mouse or keyboard for
the specified amount of time.
Saving files when you leave the editor window
A related option in the General settings, Save files on frame deactivation , is par-
ticularly useful. This option automatically saves all of your editor's open files for
you each time you deactivate the IDEA window by switching to a command
prompt or other application window. It's a good idea to enable this option if
you're compiling or building outside of IDEA and frequently forget to save your
changes before building. Of course, the downside is that sometimes you'll end up
saving changes you might not have been ready to save, but hey—that's what ver-
sion control is for, right?
Reverting your changes
If, after working with a file, you change your mind and want to back out all of
your unsaved changes, select the File | Reload from Disk command. It reloads
the current file, throwing out any changes you made during the current session.
This option is unavailable if there are no unsaved changes in the current file.
For a more powerful way to back out your changes, see section 8.3, “Us-
ing IDEA 's local history” in chapter 8.
TIP
Exporting your files to HTML format
The File | Export to HTML option lets you create a color-coded, hyperlinked
HTML representation of your source files. This command acts on the currently
active file, or the currently selected file or directory in the Project view. This
option re-creates the view you see in the editor window as an HTML document,
complete with full syntax colorization. This isn't JavaDoc; it's the source code
itself, with pretty formatting and all the necessary escaping applied. Keep in
mind that the resulting HTML code won't be useful as source code—it's full of
HTML markup, so it won't compile—but it makes a great reference. For example,
you might consider posting a Web-accessible copy of your source tree on your
 
 
 
 
 
 
 
Search WWH ::




Custom Search