Bug 216760 - No 'Quick Fix' menu item for to CEditor ruler context menu
Summary: No 'Quick Fix' menu item for to CEditor ruler context menu
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 5.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 5.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 101557 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-28 08:45 EST by David Perryman CLA
Modified: 2009-01-09 15:06 EST (History)
2 users (show)

See Also:


Attachments
Patch to cdt,ui to add the menu item (11.46 KB, patch)
2008-01-28 08:45 EST, David Perryman CLA
no flags Details | Diff
patch with revised changes (11.71 KB, patch)
2008-01-30 08:34 EST, David Perryman CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***