I am trying to do work with eclipse keybindings. I tried to make the rename command work. I looked at some lessons and experimented. I turned on command and key tracing in the console ( http://eclipsesource.com/blogs/2009/07/08/tip-tracing-keybindings-in-rcp/ ).
I created a custom command:
com.mycompany.myproduct.command.rename
This is what I got so far:
1) I tried to follow this guide http://www.vogella.com/tutorials/EclipseCommandsKeybindings/article.html , but came to the conclusion that this is for e3. This is because you need to add a plugin for commands that only old e3 handlers recognize. No xmi is involved
2) I tried using xmi binding contexts. I had my team registered in the top-level command tree and associated with the handler in the top-level handler tree. In the binding table section, I have a bindingTable that works in the context of Dialog and Windows. I added a key binding. The sequence is "F2" and it is connected to my user command.
When I find F2, I get the following message in the trace:
COMMANDS >>> execute >>> starting: id=org.eclipse.ui.edit.rename; event=ExecutionEvent(Command(org.eclipse.ui.edit.rename,Rename, Rename the selected item, Category(org.eclipse.ui.category.file,File,null,true), org.eclipse.ui.internal.MakeHandlersGo@1285594 , ,,true),{},Event {type=1 Tree {} time=1480412218 data=null x=0 y=0 width=0 height=0 detail=0}, org.eclipse.e4.ui.workbench.modeling.ExpressionContext@177fc1a )
In short, the default rename IDE command eclipse runs (my key binding does nothing) and nothing happens in my application.
However, if I change the selection to βM1 + 1β and press Ctrl + 1, a small pop-up window will appear that allows me to choose between the βquick fixβ (Eclipse IDE command) and my renaming. If I choose to rename the handler.
Now, how to disable the default eclipse IDE keyword binding. The tutorial instructions in step 1 definitely do not.
Thanks!