# Quick Fix Processor

###### Identifier:

org.eclipse.cdt.ui.quickFixProcessors

###### Since:

4.1

###### Description:

This extension point allows users to add a Quick Fix processor to offer new Quick Fixes on C/C++ problems.

The extension can specify which problem marker types it can handle. It will only get problems of these types to process.

This extension point supports the `enablement` tag. Properties to test on are:

- translationUnit: type ITranslationUnit; the translation unit the quick assist is applied on
- projectNatures: type Collection; all project natures of the current project

###### Configuration Markup:

<!ELEMENT extension (quickFixProcessor+)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance

<!ELEMENT quickFixProcessor (enablement? , handledMarkerTypes*)>

<!ATTLIST quickFixProcessor

id IDREF #REQUIRED

name CDATA #IMPLIED

class CDATA #REQUIRED>

- id - A unique identifier for the Quick Fix processor.
- name - A localized name of the Quick Fix processor.
- class - The name of the class that implements this Quick Fix processor. The class must be public and implement `org.eclipse.cdt.ui.text.IQuickFixProcessor` with a public 0-argument constructor.

<!ELEMENT handledMarkerTypes (markerType+)>

Specifies the marker types of the problems this quick fix processor can handle. If no handled marker type are specified, the processor will get problems of types org.eclipse.cdt.core.problem, org.eclipse.cdt.core.buildpath_problem and org.eclipse.cdt.core.task.

<!ELEMENT markerType EMPTY>

<!ATTLIST markerType

id IDREF #REQUIRED>

- id - The marker type id of the marker that can be handled by this processor.

###### Examples:

The following is an example of a Quick Fix processor contribution:

     <extension point="org.eclipse.cdt.ui.quickFixProcessors">
      <quickFixProcessor
       id="AdvancedQuickFixProcessor"
       name="Advanced Quick Fix Processor"
       class="com.example.AdvancedQuickFixProcessor">
       <handledMarkerTypes>
          <markerType id="org.eclipse.myplugin.audits"/>
       </handledMarkerTypes>
       <enablement>
          <with variable="projectNatures">
             <iterate operator="or">
                <equals value="org.eclipse.cdt.core.cnature"/>
             </iterate>
          </with>
       </enablement>
      </quickFixProcessor>
     </extension>

###### API Information:

The contributed class must implement `org.eclipse.cdt.ui.text.IQuickFixProcessor`

Copyright (c) 2001, 2007 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html