Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Eclipse Quick Fix

Eclipse Quick Fix


Using quick fix

In the Eclipse editor, when you type letters, the editor analyzes what you have typed for errors.

The Java editor uses Java syntax to detect errors in the code. When it finds an error or warning:

The quick fix dialog provides solutions. The quick fix dialog can be invoked in the following ways:

In the figure above, getId is highlighted because there is no method named getId() in the Person class. Select "Create method 'getId()' in type 'Person'" from the proposed fixes to add the getId() method to the Person class.

You can also right-click an error item in the Problems view and then select the quick fix menu item to display the quick fix dialog, as shown in the figure below: