Bug 216760

Summary: No 'Quick Fix' menu item for to CEditor ruler context menu
Product: [Tools] CDT Reporter: David Perryman <david.perryman>
Component: cdt-coreAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mcdirmid, r.p.miskin
Version: 5.0Keywords: contributed
Target Milestone: 5.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to cdt,ui to add the menu item
none
patch with revised changes bjorn.freeman-benson: iplog+

Description David Perryman CLA 2008-01-28 08:45:52 EST
Created attachment 88005 [details]
Patch to cdt,ui to add the menu item

Build ID: I20071213-1700

Steps To Reproduce:
1. Right click on a problem icon on the CEditor ruler, Problems that have fixes available should have a 'Quick Fix' item.

More information:
in the current release of CDT quick fixes are not fully supported in the CEditor (apart from spelling errors). However in the latest version of the source they are supported (code in org.eclipse.cdt.internal.ui.text.correction), however there is no menu item on the ruler.

I am supplying a patch which adds the menu item to the context menu.
Comment 1 Anton Leherbauer CLA 2008-01-29 04:30:59 EST
Thanks for the patch. I would like you to make some modifications:
- use CCorrectionProcessor.hasCorrections() to test for available quick fixes
- rename findJavaAnnotations to e.g. findCAnnotations
- add the definitionId attribute "org.eclipse.jdt.ui.edit.text.java.correction.assist.proposals"
  (this is the id of the common text editor QUICK_ASSIST command)
- register the action also as the "RulerClick" action under the editorActions extension point (as replacement for SelectRulerAction)
- add your name as contributor to the copyright notices
- change copyright year to 2008
Comment 2 David Perryman CLA 2008-01-30 08:34:39 EST
Created attachment 88267 [details]
patch with revised changes

I have uploaded a new patch including your suggested changes
Comment 3 Anton Leherbauer CLA 2008-01-30 08:55:39 EST
(In reply to comment #2)
> Created an attachment (id=88267) [details]
> patch with revised changes
> I have uploaded a new patch including your suggested changes

Looks great, thanks!
Comment 4 Anton Leherbauer CLA 2008-01-30 09:13:43 EST
Committed revised patch to HEAD with a minor change:
- inlined local variable 'canFix'
Comment 5 Anton Leherbauer CLA 2008-01-30 11:03:29 EST
*** Bug 101557 has been marked as a duplicate of this bug. ***