Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Create new command which does not exist in Preferences Keys
Create new command which does not exist in Preferences Keys [message #1844419] Mon, 13 September 2021 14:06 Go to next message
AFS 2021 is currently offline AFS 2021Friend
Messages: 9
Registered: September 2021
Junior Member
Hello CDT community,

I asked this same question in Newcomers forum, but I didn't get any response yet.

I want to add some custom key bindings to Eclipse, but in Preferences->Keys I cannot find matching command.

For example I want to add key binding in Call Hierarchy view for "Hide Variables, Constants and Enumerators" button to toggle it with key stroke.

https://www.eclipse.org/forums/index.php?t=getfile&id=40943&

But in Preferences->Keys I cannot find related command to toggle the button. How can I add this custom command into Eclipse?
Re: Create new command which does not exist in Preferences Keys [message #1844423 is a reply to message #1844419] Mon, 13 September 2021 15:30 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
As far as I know you can only assign keys to actions which have been made visible for menus.
The menu name for the "Hide Variables..." item is "Filter Variables"

There are three places to search ( which I tried but doesn't mean it's not there):


  1. Windows --> Preferences --> General --> Keys
    Use the filter at the top to search for text in the items
  2. Window --> Perspective --> Customize Perspective
    Look in the tab named "Action Set Availability"
    There is no filter. You have to click on each item to see what it contains
    You can use the "Shortcuts" tab to assign keys
  3. Access command in toolbar
    The magnifying glass icon in the toolbar (assigned to CTRL-3)
    Brings up a dialog named "Find Actions"
    Also has a filter line.
    Clicking on one of them causes the action
    but it give hints where to look for them in the menus
    Click outside of the dialog to dismiss it

The filters accept partial text and the text doesn't have to be in the first word.
For example, you can search for "filt" or "var' or "hide".
Be creative.

If it doesn't appear in any of these then it's probably not a visible menu item
and you likely would have to modify the source to make it visible.


[Updated on: Mon, 13 September 2021 15:48]

Report message to a moderator

Re: Create new command which does not exist in Preferences Keys [message #1844516 is a reply to message #1844423] Wed, 15 September 2021 18:25 Go to previous message
AFS 2021 is currently offline AFS 2021Friend
Messages: 9
Registered: September 2021
Junior Member
It seems like short cuts I want are not in any of the lists.

Is this article a good one to start for writing a custom keybinding plugin:
https://www.vogella.com/tutorials/EclipsePlugin/article.html

Previous Topic:Strange Extra Characters in Console Output
Next Topic:Toolchain file for CMAKE
Goto Forum:
  


Current Time: Fri Apr 19 19:15:58 GMT 2024

Powered by FUDForum. Page generated in 0.02850 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top