Friday, June 17, 2011

Eclipse: Key Strokes display utility

Key Strokes is a simple Eclipse plug-in to display the typed Key Strokes in a small, always-on-top window. Useful for doing Eclipse screen casts no matter which platform you are on. Only works when working inside Eclipse.



You can install the plug-in from it's update site:

http://sandipchitaleseclipseplugins.googlecode.com/svn/trunk/KeyStrokesUpdateSite

Please file any issues at:

http://code.google.com/p/sandipchitaleseclipseplugins/issues/list

Enjoy!

Saturday, June 04, 2011

Eclipse: Command Key binding Cross Reference

I dusted off an Eclispe Plug-in that I had developed a few years ago. The idea is similar to Emac's describe-key (Ctrl+h) and where-is (Ctrl+w) but applied to Eclipse with some additional bells and whistles.

The  Command Key binding Cross Reference Plug-in shows a pop-up dialog. The dialog can be invoked in two modes:
  • Key binding centric
  • Command centric
Key binding centric mode can be invoked by clicking on the keys icon (Ctrl+Alt+Shift+K) in the status bar. It shows the following pop-up dialog:



The focus is in the Keysequence: field. You can type any modified keys and it shows the key sequence in text for e.g. Ctrl+D in the screenshot above. The BACKSPACE works normally. If you want to enter the BACKSPACE key itself use the small left arrow menu next to the Keysequence: field. In the bottom table it shows all the commands that match the key  sequence text. The current hierarchy of contexts, platform, and some help info is shows in the legend at the bottom. For example, the legend is showing that the Editing Java Source context is the most active context. The commands applicable in the context are shown in normal font. The commands not applicable in any of the active contexts are shown in disabled font. You can invoked the active commands by double clicking on the row or selecting the row and typing Enter key.

Eclipse has different key binding schemes. You can explore the key bindings of other schemes by selecting it in the Scheme: combo box.

You can type the keys without any modifiers. In that case commands matching all modifier variants of the key sequence are shown:



This can help you see if you are defining the key binding modifiers in a consistent fashion.

Command centric mode can be invoked by clicking on the keys icon(Ctrl+Alt+Shift+L) in the status bar. It shows the following pop-up dialog:



In this mode the Command: field has the focus. You can just type part of the command name and it will filter out the matching commands. To anchor the match at the beginning use the ^. You can use the * and ? as the wildcards. You  can easily switch Key binding centric mode by hitting tab.

Lastly, the P column shows the icon of the platform if the command is defined for a specific platform such as Windows, Macor Linux. The U column shows the icon if the user has customized the key binding using Preferences > General > Keys.

You can install the plug-in from it's update site:

http://sandipchitaleseclipseplugins.googlecode.com/svn/trunk/commandkeybinding.xref.updatesite


Please file any issues at:

http://code.google.com/p/sandipchitaleseclipseplugins/issues/list


Works in Eclipse 3.5.x and 3.6.x.

Enjoy!