Skip to main content
Jump to: navigation, search

Difference between revisions of "E4/Macros"

< E4
m (Installation)
Line 18: Line 18:
  
 
The implementation is specific to the Eclipse 4.x stream and has only been tested with Eclipse 4.5 (Mars).
 
The implementation is specific to the Eclipse 4.x stream and has only been tested with Eclipse 4.5 (Mars).
 +
 +
== Integration ==
 +
 +
The vetting status of a command is defined using the ''org.eclipse.e4.ui.macros.commands'' extension point.  Commands that are ok to use with macros should be whitelisted, and commands that are unsuitable should be blacklisted.
 +
 +
The macro system provides ''hooks'' to allows other systems to reconfigure its behaviour during macro recording or playback.  For example, the ''org.eclipse.e4.ui.macros.jdt'' plugin includes a hook to disable ''Content Assist''.  These hooks are configured using the ''org.eclipse.e4.ui.macros.hooks'' extension point.
  
 
== Contributing Fixes and Improvements ==
 
== Contributing Fixes and Improvements ==

Revision as of 21:23, 14 June 2015

Keyboard macros provide a way to record and replay keyboard sequences. Keyboard macros are distinct from scripting and UI event replay. For a scripting solution for Eclipse, please see the Eclipse Advanced Scripting Environment (EASE), and for UI event replay see SWTBot.

Usage

A macro is recorded using Shift-Alt-M. A macro is replayed using Ctrl-Shift-M (or Cmd-Shift-M on OS X).

All keyboarded input is recorded. Where a key sequence initiates an Eclipse Command (e.g., Ctrl-Shift-T to invoke Open Type), the command is vetted as to whether it is suitable for a macro. Use of an unsuitable command will abort the macro recording. Most forms of mouse input will also abort the recording, except for where it triggers an Eclipse Command (e.g., from a menu item).

Commands must be vetted as some commands exhibit non-determinism in the UI presented to the user. For example, repeated calls to the command may result in very different orderings of data. For example, the Open Type dialog shows recent opened types at the top, which will change. Commands that have no yet been vetted will prompt as to whether they should be allowed.

Installation

The plugin is currently hosted in the E4 incubator and the latest snapshot is available from the p2 repository at:

http://download.eclipse.org/e4/snapshots/org.eclipse.e4.ui/

The implementation is specific to the Eclipse 4.x stream and has only been tested with Eclipse 4.5 (Mars).

Integration

The vetting status of a command is defined using the org.eclipse.e4.ui.macros.commands extension point. Commands that are ok to use with macros should be whitelisted, and commands that are unsuitable should be blacklisted.

The macro system provides hooks to allows other systems to reconfigure its behaviour during macro recording or playback. For example, the org.eclipse.e4.ui.macros.jdt plugin includes a hook to disable Content Assist. These hooks are configured using the org.eclipse.e4.ui.macros.hooks extension point.

Contributing Fixes and Improvements

The source is available at:

http://git.eclipse.org/c/e4/org.eclipse.e4.ui.git/

in the master branch as bundles/org.eclipse.e4.ui.macros and bundles/org.eclipse.e4.ui.macros. Please submit change requests using Gerrit; see the Platform/UI "How to Contribute" page for details.

Please submit bugs via Bugzilla against e4/UI with "[macros]" in the description (link).

Please direct questions to the e4-dev mailing list. More system documentation to follow!

Back to the top