Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Quickfix All(Does Xtext natively support a "quickfix all similar problems"?)
Quickfix All [message #885248] Tue, 12 June 2012 17:20 Go to next message
Brad Riching is currently offline Brad RichingFriend
Messages: 20
Registered: May 2012
Junior Member
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 17:26 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
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 07:19 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
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 09:18 Go to previous messageGo to next message
Michael Clay is currently offline Michael ClayFriend
Messages: 9
Registered: July 2009
Junior Member
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 13:28 Go to previous message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
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: Sat Apr 20 01:52:44 GMT 2024

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

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

Back to the top