# Classpath Fix Processor

###### Identifier:

org.eclipse.jdt.ui.classpathFixProcessors

###### Since:

3.4

###### Description:

This extension point allows to add a processor to offer fixes for incomplete class paths when types cannot be resolved.

This extension point supports the `<enablement>` element. The default variable is the containing `org.eclipse.jdt.core.IJavaProject`.
Defined variables for `<with>` expressions are:

- "project": type `org.eclipse.jdt.core.IJavaProject`; the current project (same as the default variable)
- "sourceLevel": type `java.lang.String`; the source compliance level of the current project

A processor can specify to override another processor. An overridden processor is only asked to provide proposals when the overriding processor returns `null` as proposals.

###### Configuration Markup:

<!ELEMENT extension (classpathFixProcessor+)>

<!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 classpathFixProcessor (enablement? , overrides*)>

<!ATTLIST classpathFixProcessor

id CDATA #REQUIRED

name CDATA #IMPLIED

class CDATA #REQUIRED>

- id - a unique identifier for the Classpath Fix processor
- name - a localized name of the Classpath Fix processor
- class - the name of the class that implements this Classpath Fix processor. The class must be public and extend `org.eclipse.jdt.ui.text.java.ClasspathFixProcessor` with a public 0-argument constructor.

<!ELEMENT overrides EMPTY>

<!ATTLIST overrides

id IDREF #REQUIRED>

- id - The id of the classspath fix processor that is overridden by the current processor. The current processor can choose to replace proposals of the extended processor.

###### Examples:

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

     <extension point="org.eclipse.jdt.ui.classpathFixProcessors">
      <classpathFixProcessor
       id="MyClasspathFixProcessor"
       name="My Classpath Fix Processor"
       class="com.example.MyClasspathFixProcessor">
       <enablement>
          <with variable="project">
       <test property="org.eclipse.jdt.core.isInJavaProjectWithNature"
             value="org.eclipse.pde.PluginNature"/>
          </with>
       </enablement>
       <overrides
          id="org.eclipse.jdt.ui.text.correction.DefaultClasspathFixProcessor">
       </overrides>
      </classpathFixProcessor>
     </extension>

###### API Information:

The contributed class must extend `org.eclipse.jdt.ui.text.java.ClasspathFixProcessor`

Copyright (c) 2007, 2013 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0