Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-ui-dev] QuickFix question

I have a question about the QuickFix mechanism.

First, some background. We are developing a plug-in that analyzes Java
source code to identify certain kinds of problems. When a problem has been
identified, we create a marker that allows the user to quickly navigate to
the location of the problem in the source. For some kinds of problems we
would like to automate the process of fixing the problem. Specifically, we
would like the user to be able to double-click on the icon representing the
marker that is displayed in the bar to the left of the Java source code in
the editor (or use any of the equivalent invocation paths) and select from a
list of possible corrections.

I found the "quick fix" extension point (org.eclipse.ui.markerResolution),
but this appears to only allow additions to the list of fixes presented from
the Quick Fix dialog available via the "Quick Fix..." menu item in the Task
view. This does not help us because the problems we find are displayed in a
custom view rather than being included in the Task view. Doing a bit more
investigating, it looks like the list of corrections available when
double-clicking on a marker icon is hard-coded in the method


org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectC
orrections(ProblemPosition,ArrayList)

Am I just missing something? Is there a way to provide corrections that the
user can select from by double-clicking on the marker icon? If so, how? If
not, are there any plans to either add such support, or (preferably) to
reconcile these two apparently disjoint Quick Fix mechanisms? Thanks for any
information you can provide.

Brian Wilkerson
Instantiations, Inc.



Back to the top