Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Contributing marker resolution

Plug-ins can also define marker resolutions, so that their problem markers can participate in the workbench Quick Fix feature. Users can select a problem marker and choose a Quick Fix from a popup containing the list of supplied fixes contributed for the marker.

Marker quick fix menu

Marker resolutions are contributed using the org.eclipse.ui.ide.markerResolution extension point. This extension point allows plug-ins to associate a class that implements IMarkerResolutionGenerator with a particular type of marker.  The marker can be qualified by marker type only, or it can be further qualified by the value of one or more of its attributes. The JDT contributes a marker resolution for Java problems:

<extension
	point="org.eclipse.ui.ide.markerResolution">
	<markerResolutionGenerator
		markerType="org.eclipse.jdt.core.problem"
		class="org.eclipse.jdt.internal.ui.text.correction.CorrectionMarkerResolutionGenerator">
	</markerResolutionGenerator>
</extension>

The marker resolution generator is responsible for returning an array of marker resolutions ( IMarkerResolution) that will be shown in the Quick Fix popup. The resolution will be run() if the user selects one of the fixes.

Marker resolutions

The Problems view supports resolving multiple problems at once. The user can add other matching problems to the list of problems to fix, and then apply all fixes in one go. To support multiple resolutions, your implementation of IMarkerResolution must be a subclass of WorkbenchMarkerResolution.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire