Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to add context menu & key binding to CEditor?(Key binding doesn't work)
How to add context menu & key binding to CEditor? [message #644245] Fri, 10 December 2010 03:27
Mark Anderson is currently offline Mark Anderson
Messages: 8
Registered: October 2010
Junior Member
Hi all,

I'm extending CDT 7.0 for some purposes on Eclipse Helios.
I've made context menu on CEditor via viewer contribution of org.eclipse.ui.popupMenus extension point.

   <extension
         point="org.eclipse.ui.popupMenus">
      <viewerContribution
            id="mine.ui.popupMenus.editorContextMenu"
            targetID="#CEditorContext">
         <action
               class="mine.ui.action.editor.SighAction"
               definitionId="mine.ui.command.sigh"
               id="mine.ui.action.editor.action.sigh"
               label="Sigh~~~"
               menubarPath="additions">
         </action>
      </viewerContribution>
   <extension>


Above works great... but I have to add keyboard shortcut for this action.
So I've also extended org.eclipse.ui.commands and org.eclipse.ui.bindings. But key bindings doesn't work.
The key binding I've created is properly existed in the Preferences (Keys) .
How can I handle this situation?
Is there any way to make context menu CEditor of CDT?

Have a nice day and thanks in advance for any comments.
Previous Topic:Source file not being included in a build
Next Topic:Bad file number
Goto Forum:
  


Current Time: Tue Jul 22 17:40:47 EDT 2014

Powered by FUDForum. Page generated in 0.10832 seconds