
- Eclipse Tutorial
- Eclipse - Home
- Eclipse - Overview
- Eclipse - Installation
- Eclipse - Explore Windows
- Eclipse - Explore Menus
- Eclipse - Explore Views
- Eclipse - Perspectives
- Eclipse - Workspaces
- Eclipse - Create Java Project
- Eclipse - Create Java Package
- Eclipse - Create Java Class
- Eclipse - Create Java Interface
- Eclipse - Create XML File
- Eclipse - Java Build Path
- Eclipse - Run Configuration
- Eclipse - Running Program
- Eclipse - Create Jar Files
- Eclipse - Close Project
- Eclipse - Reopen Project
- Eclipse - Build Project
- Eclipse - Debug Configuration
- Eclipse - Debugging Program
- Eclipse - Preferences
- Eclipse - Content Assist
- Eclipse - Quick Fix
- Eclipse - Hover Help
- Eclipse - Search Menu
- Eclipse - Navigation
- Eclipse - Refactoring
- Eclipse - Add Bookmarks
- Eclipse - Task Management
- Eclipse - Install Plugins
- Eclipse - Code Templates
- Eclipse - Shortcuts
- Eclipse - Restart Option
- Eclipse - Tips & Tricks
- Eclipse - Web Browsers
- Eclipse Useful Resources
- Eclipse - Quick Guide
- Eclipse - Useful Resources
- Eclipse - Discussion
Eclipse - Quick Fix
Using Quix Fix
As you type characters into an eclipse editor it analyzes the document content for potential error and warnings. The java editor uses the java syntax to detect errors in the code. When it finds error or warning, it −
- Highlights errors using red squiggly lines.
- Highlights warnings using yellow squiggly lines.
- Displays errors and warnings in the
Problem
view. - Adds a light bulb with a warning sign or error sign to the vertical ruler.
The quick fix dialog provides a list of possible corrections. The quick fix dialog can be invoked by −
- Placing the mouse pointer on a squiggly line.
- Clicking on the light bulb.
- Placing the cursor in the highlighted text and selecting Quick fix from the Edit menu or clicking shortcut
Ctrl + 1
.

In the above diagram, getId is highlighted because the Person class does not have a method called getId(). Selecting Create method 'getId()' in type 'Person'
would cause the getId() method to be added to the Person class.
The Quick Fix dialog can also be displayed by right clicking on the error item in the Problems view and selecting the Quick Fix menu item.
Advertisements