Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323889 - Replace hard-coded refactoring menu with org.eclipse.ui.menus ext. point
Summary: Replace hard-coded refactoring menu with org.eclipse.ui.menus ext. point
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-28 15:05 EDT by Martin Schwab CLA
Modified: 2020-09-04 15:23 EDT (History)
3 users (show)

See Also:


Attachments
cdt refactoring menu cosmetics (17.26 KB, patch)
2010-08-28 20:18 EDT, Martin Schwab CLA
no flags Details | Diff

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