During the refactoring of some legacy codes, it became necessary to create your own Eclipse Quick Fix in order to make minor adjustments to the code. This (in itself) was fairly simple after this article (in German):
http://jaxenter.de/artikel/Eclipse-JDT-um-eigene-Quickfixes-erweitern
A quick fix ( IQuickFixProcessor) is added through the extension point org.eclipse.jdt.ui.quickFixProcessorsthat it creates IJavaCompletionProposalto do the job. IQuickFixProcessorhas an AST available for code changes.
The problem that I am facing right now is that I can only apply Quick Fix to one problem at a time. If I select several problems (all of the same types, therefore my own quick fix is applicable), I get the error message "The selected problems do not have a common applicable quick fix."
How to create a Quick Fix that can be used for several problems of the same type?
Using an extension point org.eclipse.ui.ide.markerResolution, as suggested by Acanda, seems very difficult to implement Java source files. For one, there is no AST, only an instance IMarker. How to get AST CompilationUnitand insult ASTNodefor IMarker?
More general: is there an API in JDT for working with IMarkerinstances ??