This page provides a brief introduction to the Eclipse Monkey scripting tool.
Contents |
Introduction
Eclipse Monkey is a dynamic scripting tool that allows you to automate repetitive and tedious programming tasks for Eclipse and/or Aptana Studio. Because you script against an API layer when you write Eclipse Monkey scripts, you will not need to touch the actual Eclipse code or develop separate Java plugins to perform simple tasks.
Eclipse Monkey features
This sections lists some of the features of Eclipse Monkey.
Requirements
Eclipse Monkey is currently available as a plug-in for Eclipse v3.2 and v3.3.
Brief history of Eclipse Monkey
- Developed by Ward Cunningham and Bjorn Freeman-Benson
- Inspired by Greasemonkey scripting tool for Mozilla
- Integrated with Aptana Studio in March 2007
- Will be part of the Europa (Eclipse 3.3) simultaneous release
Advantages of scripting
Scripting has many advantages over doing full-blown Java development to make small changes to the Eclipse UI:
- Write scripts in JavaScript
- No need to create new plug-ins
- No interference with the actual Eclipse code
- Bundle scripts with a project
- Leverage HTML and JavaScript to create Eclipse Views
- Add keybindings to run a script
Supported languages
Currently, Eclipse Monkey supports JavaScript and Ruby. In the future, Eclipse Monkey will support Groovy.
Eclipse Monkey DOMs
Script against Document Object Models (DOMs) to avoid having to change the actual Eclipse code. Eclipse Monkey ships with several built-in DOMs (e.g. "window"), and you may also specify a URL for an update site containing a DOM to download and script against that DOM.
Running Eclipse Monkey Scripts
Eclipse Monkey includes a number of options for running your Eclipse Monkey scripts:
- Run from a menu item
- Hotkey / shortcut key
- Run from Scripts View (Right-click > Execute or double-click)
- Trigger to run on an event
- Run on startup
See Adding metadata to an Eclipse Monkey script to learn more about how to set up your Eclipse Monkey scripts to run the way that you would like.