Multiple Quick Fix.

Tell us what you think about our book and report any errata. Sample chapters are available at

(Note: Previous Editions were called "Eclipse: Building Commercial Quality Plugins")

Moderators: Eric Clayberg, Dan Rubel

Multiple Quick Fix.

Postby kumarmadhavan » Tue Oct 10, 2006 3:25 am

Dear All,

Good Evening.

I'm working on providing quick fix for multiple markers of same type in a single operation. I've organized the markers in a tree view so as to get the consolidation of markers by the type.

But when I perform the operation for multiple quick fix, the first quick fix happens successfully. When I commit the change:
1. All the marker reference/ position becomes invalid and
2. All other markers for the file is refreshed.

Since the marker positions become invalid due to change in the document, we could not apply quick fix on markers which does not exist.

We also tried to capture the marker properties, but since our quick fix is formatting, the offset of the marker becomes invalid.

Kindly let me know how to implement a solution for this.

Any help in this regard is highly appreciable.

Thanks in advance for your time and help.

Thanks & Regards,
Kumar Madhavan.
Posts: 1
Joined: Tue Oct 10, 2006 2:55 am

Postby Brian Wilkerson » Tue Oct 10, 2006 5:21 am

I'm not entirely sure what you're trying to do, so I'll address the two most likely issues.

If you're trying to fix multiple markers in a single operation you need to order the markers by their locations within the resource and fix them in reverse order (starting at the end of the resource and ending at the beginning of the resource) because the position information will not get updated until you save the changes.

If you need to have your un-fixed markers track after a save, then you need to use the extension point org.eclipse.ui.editors.markerUpdaters to register an updater for your particular type(s) of markers.

If I've misunderstood the issue you're facing, let me know.
Brian Wilkerson
Google, Inc.
Brian Wilkerson
Posts: 32
Joined: Fri Apr 28, 2006 9:37 am

Return to Book: Eclipse Plug-Ins (3rd Edition)

Who is online

Users browsing this forum: No registered users and 1 guest