Bug 196141 - [api] fix unresolvable references through extension point
Summary: [api] fix unresolvable references through extension point
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Martin Aeschlimann CLA
QA Contact: Wassim Melhem CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 88204
  Show dependency tree
 
Reported: 2007-07-11 08:21 EDT by Martin Aeschlimann CLA
Modified: 2007-09-12 10:17 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2007-07-11 08:21:17 EDT
3.4

We should add an extension point where contributers can tell us how to fix unresolvable reference to a type.
For example if a JUnit type is missing, 'Test', PDE would fix this by adding a plug-in dependency.

This would help us with useless proposals of the 'Fix unresolved reference' quick fix (bug 116501) and in the JUnit wizard (bug 195674).
Comment 1 Chris Aniszczyk CLA 2007-08-30 10:20:11 EDT
We love JDT
Comment 2 Martin Aeschlimann CLA 2007-09-12 10:17:49 EDT
added new extension point 'org.eclipse.jdt.ui.classpathFixProcessors'
> 20070912

Clients can contribute their own ClasspathFixProcessor that can also override other ClasspathFixProcessors.

For example, org.eclipse.jdt.ui.junit provides a processor that adds the JUnit container for all import starting with 'junit' or 'org.junit'.
<extension point="org.eclipse.jdt.ui.classpathFixProcessors">
  <classpathFixProcessor
     name="%junitClasspathFixProcessor"
     class="org.eclipse.jdt.internal.junit.ui.JUnitClasspathFixProcessor"
     id="org.eclipse.jdt.junit.JUnitClasspathFixProcessor">
     <overrides
         id="org.eclipse.jdt.ui.text.correction.DefaultClasspathFixProcessor">
     </overrides>
  </classpathFixProcessor>
</extension>

PDE can now add a processor that replaces this processor by one that adds a plug-in dependency to org.junit instead of adding the JUnit container.

Chris, let me know if you need help.