Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323889

Summary: Replace hard-coded refactoring menu with org.eclipse.ui.menus ext. point
Product: [Tools] CDT Reporter: Martin Schwab <mschwab>
Component: cdt-refactoringAssignee: Project Inbox <cdt-refactoring-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: enhancement    
Priority: P3 CC: aleherb+eclipse, eclipse.sprigogin, yevshif
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
cdt refactoring menu cosmetics none

Description Martin Schwab CLA 2010-08-28 15:05:09 EDT
Build Identifier: CDT 7.0.0.201006141710, Platform 3.6.0 (I20100608-0911)

Looking at the class CRefactoringActionGroup sends cold shivers up and down my spine. I'd like to replace those hard-coded menu items with the new org.eclipse.ui.menus/commands/handlers extension points. 

* Lowers the integration barrier for new refactorings.
* This could redeem the cdt.ui/plugin.xml from using the word "jdt".

I think the hard part will be to write good visibleWhen-statements. In addition I fear that there are dependencies on JDT which could result in two refactoring menus. The context menu will need some care too.

Reproducible: Always
Comment 1 Martin Schwab CLA 2010-08-28 20:18:26 EDT
Created attachment 177667 [details]
cdt refactoring menu cosmetics

This patch removes the old org.eclipse.ui.actionSet menus and replaces them with org.eclipse.ui.menus.

Any suggestions?
Comment 2 Markus Schorn CLA 2010-08-30 04:00:05 EDT
With your patch, the refactoring menu gets duplicated (one for java, one for c/c++), when I open a java-file, the CDT refactoring menu is shown in the main menu, even when I am in the Java Perspective.

I don't see how your patch changes the coded ActionSet (it will still be used for the purpose of computing the context menues in the editor and various views). 

I don't quite see why it would be a problem to contribute a new refactoring?