Sunday, 8 December 2013

Eclispe menu contribution based on active context

There are lot of good blogs explaining how to add a menu item in one of the menus of Eclipse. What I will focus on is how to enable/disable them according to specific editors. I explained in my previous blog, how to enable/disable context on editor switching. On that understanding if we enable/disable menu items on active contexts then our work is done. This is how a typical menu item is coded in plugin.xml Use enableWhen tag to enable it on a particular condition. Use...
Read More...

Monday, 18 November 2013

activate de-activate context on switching editor - Eclipse RCP

Developing multi-editor Eclipse based application like Eclipse plugin for HTML editor and JavaScript editor might require activating and deactivating of contexts on switching the editors. One use case is to support different shortcuts in different editors. In Eclipse editor plugins it's common to enable some shortcuts in one editor but disable in other. For instance if you keep a shortcut for inserting HTML header then that shortcut will not make sense in JavaScript editor. To manage shortcuts you need to manage contexts. Code...
Read More...