Java Reference
In-Depth Information
The Go To commands support an extremely useful feature called quick
switching . Let's say you use Go To | Class to find a specific class and enter
the name, only to realize that it's not a Java class but an XML file you're
searching for. If you press Ctrl+Shift+N , the pop-up quick-switches to
the Go To | File pop-up and keeps your entered text in the field.
TIP
Reopening a recently opened file
You can reload a recently opened file by selecting the View | Recent Files com-
mand or by pressing Ctrl+E while in the editor. Selecting this option displays a
dialog box containing a list of files you have opened recently. Files are sorted
from most-recently opened to least-recently opened. You can use your mouse or
the arrow keys to select a file to reopen from the list. The maximum number of
files stored in the recent history list can be configured in the IDE settings by
adjusting the Recent files limit option of the Editor settings panel.
How IDEA handles nonproject files
As discussed in chapter 1, IDEA was designed to work with your source files in the
context of a module composed of well-defined source and class paths. This allows
IDEA to understand the relationships between your source files, the module, and
the rest of the project. Occasionally, you'll need to edit (or at least view) a file from
outside your project. Perhaps you need to view a log file from an application
server where your code is deployed or reference code in another project. What-
ever the case, and wherever your file, you can use the File | Open File command
to load the file into the editor. If the file is outside of your project, you'll have to
live with some limitations:
You can't use any of the code-analysis tools on the file.
You can't refactor the file in any way.
No error analysis is performed on the file.
You can't compile the file if it's a Java source file.
You can't reformat the code if it's a Java source file.
As you can see, you can edit the file, and that's about it. Allowing anything more
would confuse the project situation, because IDEA wouldn't understand how the
current code is supposed to relate to the rest of the project with regard to class
paths and other dependencies.
 
 
 
 
 
 
Search WWH ::




Custom Search