Java Reference
In-Depth Information
Figure 3.5 IDEA's ability to analyze your code syntax in real time means fewer compile-time
errors, more time programming, and less time building and debugging. Syntax errors are spotted
within a few moments of your typing them and are immediately flagged for inspection. Note the
stripe (or marker ) in the marker bar on the right, the wavy line under the erroneous code, and the
tooltip that explains the problem.
3.4.1
How IDEA alerts you to problems in your code
Any problems discovered in your code by IDEA are highlighted in the editor win-
dow with your selected color scheme. By default, errors appear in red, or with
wavy underlines, depending on the type of error encountered. You can see the
reason for the problem by hovering over the error, as shown in figure 3.5, where
we've made an invalid constructor call to the JProgressBar .
Errors and warnings are also indicated by little red or yellow tick marks in
the right margin of the code editor in the area known as the marker bar , also
shown in figure 3.5. Hovering over a tick mark gives you a brief description of
the problem, and clicking it moves your cursor to the problem's location in the
source code.
3.4.2
Monitoring the status of the current document
Notice the document status indicator in the upper-right corner of the editor con-
tent window, at the top of the error stripe. This square indicates the current state
of your document. It can be in any one of the following states:
Clear —Document has not yet been analyzed. Particularly long classes may
take a few moments to be analyzed when you first open them.
Green —Everything's fine (as far as IDEA can determine). No syntax errors
or warnings are present.
 
 
 
 
 
 
Search WWH ::




Custom Search