Finer grained quickfixes possible? [message #881305] |
Mon, 04 June 2012 06:07  |
Eclipse User |
|
|
|
Hi,
I want to implement a quickfix that only applies (for a certain issueCode) depending on extra data. For example: "library ieee;" should be quickfixable, but "library myLib;" not.
I can not find a way to do this in Xtext, except for giving a different issueCode for the libraries that can be fixed. I do not like this approach. It is not the responsability of the validator to know what can be fixed and what not (yet).
In Eclipse the method to check for quickfixes is hasResolution(IMarker...) but in Xtext it is hasResolutionFor(String issueCode). Why is this method not simply hasResolutionFor(Issue issue), so you check some extra data of the issue?
Thanks,
Hendrik.
|
|
|
|
|
|
Re: Finer grained quickfixes possible? [message #885131 is a reply to message #885094] |
Tue, 12 June 2012 10:05   |
Eclipse User |
|
|
|
You are right, I missed that.
You'd have to override
AnnotationIssueProcessor.getAnnotationsToAdd(Multimap<Position,
Annotation>, List<Issue>, IProgressMonitor) and use the issue data
there. That's unfortunate. Could you please file a ticket?
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 12.06.12 15:09, schrieb Hendrik Eeckhaut:
> Hi Sebastian,
>
> this only partially works. This allows quickfixes in the problems view,
> but not in the editor. As far as I can see the quickfix-abiliy is
> determined in the getAnnotationsToAdd method in
> AnnotationIssueProcessor. It does not look like I can easily modify that.
>
> Any suggestions?
>
> Thanks,
> Hendrik.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03137 seconds