Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » How to associate keyboard shortcuts with custom features?
How to associate keyboard shortcuts with custom features? [message #1099314] Sun, 01 September 2013 09:39 Go to next message
Surya Kathayat is currently offline Surya Kathayat
Messages: 33
Registered: July 2012
Member
Hi,

Can we associate keyboard shortcuts with custom features?

If yes, how it can be done.?

Best Regards
Surya
Re: How to associate keyboard shortcuts with custom features? [message #1100616 is a reply to message #1099314] Tue, 03 September 2013 06:46 Go to previous message
Felix Velasco is currently offline Felix Velasco
Messages: 36
Registered: July 2009
Member
Yes, you can.

See org.eclipse.graphiti.testtool.sketch plug-in for an example.

In the plugin.xml the key binding is created to the org.eclipse.graphiti.ui.featureExecutionCommand commandId, and in SketchToolBehavior#getCommandFeature, the custom feature to execute is selected. The hint parameter let's you select the specific feature so you can use different bindings for different features.

Since this approach uses the command infrastructure, it can be used for key bindings, menu entries, toolbar buttons, etc...
Previous Topic:graphiti diagram editor xmi persistence encoding
Next Topic:how to get file path created by wizard after the wizard execute
Goto Forum:
  


Current Time: Mon Oct 07 09:21:49 EDT 2013

Powered by FUDForum. Page generated in 0.01538 seconds