Create an Eclipse plugin with customizable key bindings -


I worked with customizable key bindings to customize an Eclipse plugin. I tried this with plugin.xml:

  & lt; Plugin & gt; & Lt; Extension point = "org.eclipse.ui.commands" & gt; & Lt; Command description = "do something" id = "com.myplugin.myCommand" name = "my order" & gt; & Lt; / Order & gt; & Lt; / Extension & gt; & Lt; Extension point = "org.eclipse.ui.bindings" & gt; & Lt; Key command Id = "com.myplugin.myCommand" contextId = "org.pythczdev.ui.editor.scope" scheme id = "org.eclipse.ui.default Accelerator Configuration" order = "Ctrl + Return" & gt; & Lt; / Key & gt; & Lt; / Extension & gt; & Lt; / Plugin & gt;  

The default binding Ctrl + Return works perfectly, but it does not appear in the preferences. What is missing it to appear in preferences, so that the user can customize the key binding?

Try adding categoryId to your command definition.

  & lt; Extension point = "org.eclipse.ui.commands" & gt; & Lt; Category id = "com.myplugin.mycategory" name = "my category" description = "my category" & gt; & Lt; / Category & gt; & Lt; Command Details = "Do Something" id = "com.myplugin.myCommand" category Id = "com.myplugin.mycategory" name = "My order" & gt; & Lt; / Order & gt;  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -