1.
|
Build problems are always displayed in the Tasks view.
(At this point the Tasks view should be empty.)
|
2.
|
Open junit.framework.TestCase.java
in the editor from the Package Explorer view.
|
3.
|
Add a syntax error by deleting the semicolon at the end
of the first line in the file (package junit.framework;).
![]() |
4.
|
Click the Save button
when you are done. The project is incrementally built, and the problem
is revealed.
Note: Only the changed file and the files depending on
it are recompiled.
|
5.
|
The problem is indicated as follows:
![]() |
6.
|
You can hover over the problem marker in the marker bar
to view a description of the problem.
![]() |
7.
|
Click the Close button
on the editor's tab to close the editor.
|
8.
|
In the Tasks view, select a problem in the list. Open
its context menu and select Go To. The file is opened in the editor at
the location of the problem.
![]() |
9.
|
Correct the problem in the editor by adding back the
semicolon, then click the Save button.
The project is built automatically on save, and all problem
indicators in the workbench disappear.
|
10.
|
In the Outline view, select the method getName(). The editor will scroll to this method. |
11.
|
On the first line of the method change the returned variable fName to fTestName. While you type, a problem highlight underline appears on fTestName, to indicate a problem. Hovering over the highlighted problem will display a description of the problem. |
12.
|
On the marker bar a light bulb marker appears. The light bulb signals
that correction proposals are available for this problem.
![]() |
13.
|
Set the cursor inside the marked range and choose Quick
Fix from the Edit menu bar. You can also press Ctrl+1 or left click
the light bulb. A selection dialog appears with possible corrections.
![]() |
14.
|
Select 'Change to fName' to fix the problem. The problem highlight line will disappear as the correction is applied. |
15.
|
Close the file without saving. |
16.
|
You can enable or disable the various problem indicators under Window > Preferences > Java > Editor > Problem Indication |