Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Quickfix All(Does Xtext natively support a "quickfix all similar problems"?)
Quickfix All [message #885248] Tue, 12 June 2012 13:20 Go to next message
Eclipse UserFriend
Hello everyone,

I've searched through the forums and cannot find anyone who has asked this question already. Does anyone know if Xtext supports a "quickfix all" in the default shipped quickfix mechanism? Say I have a bunch of lowercase names that I've flagged with warnings from my validator (with an appropriate issue code). My quickfix is able to capitalize them all individually by hovering over and clicking them one by one to perform the uppercase correction. I'm wondering if I could insert an option in the quickfix popup that would allow me to correct all similar problems with one click.

To solve this, would I have to implement my own quickfix provider and bind it in the UI module?

Thanks in advance.
Re: Quickfix All [message #885255 is a reply to message #885248] Tue, 12 June 2012 13:26 Go to previous messageGo to next message
Eclipse UserFriend
Brad,

You'll have the chance to fix all similar issues if you trigger the fix
from the problems view. You may want to digg into that code to achieve a
similar functionality in the editor.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 12.06.12 19:20, schrieb Brad Riching:
> Hello everyone,
>
> I've searched through the forums and cannot find anyone who has asked
> this question already. Does anyone know if Xtext supports a "quickfix
> all" in the default shipped quickfix mechanism? Say I have a bunch of
> lowercase names that I've flagged with warnings from my validator (with
> an appropriate issue code). My quickfix is able to capitalize them all
> individually by hovering over and clicking them one by one to perform
> the uppercase correction. I'm wondering if I could insert an option in
> the quickfix popup that would allow me to correct all similar problems
> with one click.
>
> To solve this, would I have to implement my own quickfix provider and
> bind it in the UI module?
>
> Thanks in advance.
Re: Quickfix All [message #919657 is a reply to message #885255] Sat, 22 September 2012 03:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi Brad, Hi Sebastian,

I am very interested in this functionality as well.
Therefore I tried to dive into this in order to evaluate chances for
implementing it.
However, I did not found how to trigger this from the problems view.
Is this possibility still available in Xtext 2.3.1?

Thanks for any pointers.


Sebastian Zarnekow wrote:

> Brad,
>
> You'll have the chance to fix all similar issues if you trigger the fix
> from the problems view. You may want to digg into that code to achieve a
> similar functionality in the editor.
>
> Regards,
> Sebastian
Re: Quickfix All [message #919731 is a reply to message #919657] Sat, 22 September 2012 05:18 Go to previous messageGo to next message
Eclipse UserFriend
pls have a look at org.eclipse.ui.internal.views.markers.QuickFixPage.
do you know the plugin-spy http://www.eclipse.org/pde/incubator/spy/?
Re: Quickfix All [message #919895 is a reply to message #885248] Sat, 22 September 2012 09:28 Go to previous message
Eclipse UserFriend
I had a look into this in July. Conclusion is that you have to do a lot of additional stuff.

Some key code concepts you might want to investigate:

MarkerResolution needs to inherit WorkbenchMarkerResolution (currently not)

Overwrite org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator.getAdaptedResolutions(List<IssueResolution>)

You'd need modify Xtext Issue Resolution

Andreas

Previous Topic:Using multiple providers
Next Topic:Customizing the outline
Goto Forum:
  


Current Time: Mon Jul 14 18:03:47 EDT 2025

Powered by FUDForum. Page generated in 0.03877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top