When you use eclipse to develop a Java Web application, the editor will not only provide developers with common functions such as code writing, auxiliary hints, and real-time compilation, but also enable advanced operations such as quick modification, refactoring, and syntax correction for Java source code. Through the Eclipse Java Editor, we can easily find some grammatical errors, and follow the prompts for quick correction, but also convenient. The debugging capabilities provided by the Eclipse Java Editor are described below.
1. Error prompt
At the far left of the line of code where the error occurred, to indicate where the error is located, move the mouse over the tag, and the specific error message is displayed, 1.7 shows the specific error message that is displayed when the variable is undefined.
Figure 1.7 Specific error messages
2. Red wavy lines below the code
Below the code where the error appears, a wavy red line appears, moving the mouse over the red wavy line, which shows the available quick fixes (shown in example 1.8), and clicking on the specific hyperlink to make a quick fix error.
Figure 1.8 The Quick fix prompt box available
3. Markup in the upper-right corner of the editor window
Its role is to prompt the developer that there is an error somewhere in the document, move the mouse over the icon, and the number of specific errors will be displayed, as shown in 1.9.
Figure 1.9 shows the number of specific errors
4. Markup on the right side of the editor window
In the blank position on the right side of the editor, you can see one or more red rectangles that indicate the approximate position of the line where the error is located, and if the code is very large, you can click the red rectangle block to quickly locate the row of the error.
5. The Issues panel
In the bottom middle of eclipse, there is a "markers" panel, in which errors or warnings appear in the project in tabular form. Figure 1.10 is a "markers" panel that includes 16 errors.
Figure 1.10 "Markers" panel
Skillfully debug with Eclipse Java Editor