Java Reference
In-Depth Information
At the top of the message tree in the Messages window, IDEA displays summary
information about the status of the build, including the number of errors and
warnings encountered. Following that are all the compilation errors, grouped by
the source file responsible for generating them. The toolbar buttons on the left
side of the window are helpful for sifting through the various messages.
Interpreting compilation messages
The Messages window displays two types of messages: errors and warnings. The
difference between the two is that an error prevents the file from being compiled,
but a warning doesn't (although it may indicate a real problem in your code).
Each type of problem has its own icon, along with an error message generated by
the compiler. The two numbers that precede each message are the row and col-
umn number where the problem was encountered.
Resolving compilation errors
IDEA makes it easy to track down and resolve any compilation problems you
encounter. Double-click any error message in the Messages window to jump
straight to the source of the problem. If you enable the Autoscroll to Source
option, a single click will suffice. Alternatively, use the Messages window buttons to
move through the error messages. The shortcuts Ctrl+Alt+Up and Ctrl+Alt+
Down are even better—keep pressing them until you've visited (and, we hope, cor-
rected) all the errors, and then try again.
Saving a record of compilation problems
The Export to Text File button in the Messages window toolbar ( Alt+O ) lets you
create a plaintext version of the compilation report and save it to a file, as shown
in figure 5.6. You can print this file and bring it to the next dev meeting or leave
it on the desk of that guy who always breaks the build.
You can use the Export to Text File feature as an easy way to capture the
compiler output through the clipboard, so you can paste it into an e-mail
or other application. Select the errors you're interested in, and then click
the Copy button to add them to the clipboard.
TIP
5.2 Extending IDEA's build system with Ant
In recent years, the open source tool Ant has become the de facto standard for
building Java projects. Like its venerable ancestor make , Ant is a tool for building
and packaging your development project. Built on Java and XML , Ant is easy to
 
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search