Twitter github

Eclipse Easter Eggs

So, I’m working on a quick demo of RCP for some students… I like to use the RCP Browser example alot because it is simple and easy to modify. So I was digging through the code and I noticed this snippet:

/**
* The easter egg action.
* See the corresponding command and key binding in the plugin.xml,
* and how it’s registered in createBrowser.
*/
private Action easterEggAction = new Action() {
{
setActionDefinitionId(
IBrowserConstants.COMMAND_PREFIX + “easterEgg”); };
public void run() {
browser.execute(“window.confirm(‘You found the easter egg!’)”);
}
};

Digging further, I found the way to invoke the action was via CTRL+SHIFT+E

Anyone know of any other Eclipse easter eggs out there?

  • Nick Edgar

    Hey, you’re the first person I’ve come across that found this easter egg (or at least the first to blog about it). I put it in there to illustrate how to register an action with the keybinding service, without it having to be placed into the menus or toolbars.

  • Nick Edgar

    Hey, you’re the first person I’ve come across that found this easter egg (or at least the first to blog about it). I put it in there to illustrate how to register an action with the keybinding service, without it having to be placed into the menus or toolbars.

  • Nick Edgar

    It also shows the new-in-3.1 support for executing Javascript in the Browser control.

  • Nick Edgar

    It also shows the new-in-3.1 support for executing Javascript in the Browser control.