| Summary: | Allow one quick fix to be reported with several variants | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Tomasz Wesolowski <kosashi> | ||||
| Component: | cdt-codan | Assignee: | CDT Codan Inbox <cdt-codan-inbox> | ||||
| Status: | NEW --- | QA Contact: | Elena Laskavaia <elaskavaia.cdt> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, yevshif | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 355402 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Tomasz Wesolowski
Do you have a redesign proposal in mind? We're currently extending the point: org.eclipse.ui.ide.markerResolution I'd suggest to drop that and instead extend: org.eclipse.cdt.ui.quickFixProcessors and let the little dwarfs inside org.eclipse.cdt.ui create IMarkerResolutions from the ICCompletionProposals that we'd create. I think this way is more correct (it solves this problem and might also solve bug 349590, additionally allows for different icons for fixes, etc). I've done some initial prototyping. I can now confirm that submitting quick fixes via a quickFixProcessor solves bug 349590. Finally quick fixes in hovers for Codan, yay! Created attachment 201947 [details] [w.i.p.] Working prototype and example quick fix This is a working prototype for the new extension point. There's also a new-style quick fix for catch by reference (just as a demonstration for now). If you apply the proposed patch from bug 349590, you'll see the new fixes proposed on problem hover! Finally. The fixes aren't proposed on Ctrl+1 due to bug 355402, you can work that around for now by editing CCorrectionProcessor.getProblemLocation(..) to disregard the value of problemId until we get a better solution. I've been using terminology along the lines of CodanProblemFix*, not QuickFix*, to avoid confusion between our new extension point and the CDT's. If we're going to stay with this solution (I hope we are!), then some more features from the old extension point must be rewritten to the new extension point, like specifying problems via a message pattern and the quick fix base classes. After that, we can port the quick fixes to the new infrastructure and deprecate the old extension point. |