Skip to content

General Information

mfeber edited this page Jun 2, 2014 · 1 revision

The github repository (currently) contains 2 branches: master and dev. Active development should occur in the dev branch. Releases will be made from the master branch.

Projects

The repository contains 9 Eclipse projects consisting of:

Primary projects

  • Emacs+ - Contains all the source code and the primary command/key bindings.
  • Emacs+OptionalBindings - Contains convenience bindings to standard eclipse editor commands and optional bindings for Emacs+ commands.
  • Emacs+MacCmd - Mac OS X Command key version of Emacs+ bindings
  • Emacs+MacCmdOptionalBindings - Mac OS X Command key version of convenience bindings to standard Eclipse editor commands and optional bindings for Emacs+ commands.

Feature projects

These are used in conjunction with the Update Project for building the Update Site. There is one of these for each primary project. In each, the feature.xml is used to specify build information about the corresponding primary project.

  • Emacs+Feature - Emacs+ feature project
  • Emacs+OptionFeatures - Emacs+OptionalBindings feature project
  • Emacs+MacCmdFeature - EmacsMacCmd feature project
  • Emacs+MacCmdOptionalFeatures - Emacs+MacCmdOptionalBindings feature project

Update Project

The Update project is used in conjunction with the Eclipse UI to build an Update Site. The site.xml file is used to specify which features (and hence, which primary projects) will be used in the Update Site as well as invoking the build itself.

  • Emacs+Update

#Packages and Code Organization

The package structure of the Emacs+ project is relatively simple

  • com.mulgasoft.emacsplus - Contains plugin activation code, some common structures used by commands (e.g. RingBuffer) and assorted interfaces.
  • com.mulgasoft.emacsplus.commands - Contains all the commands implemented via handlers (pre-E4 speak)
  • com.mulgasoft.emacsplus.e4.commands - New with E4, contains commands and support for a hybrid pre/E4 Emacs+
  • com.mulgasoft.emacsplus.execute - Support for assorted command executions that were typically more complex than what would conveniently fit in a typical handler (e.g.KbdMacroSupport)
  • com.mulgasoft.emacsplus.minibuffer - All the many mini buffers
  • com.mulgasoft.emacsplus.preferences - Support for the standard Eclipse preference UI

Prior to E4 (and hence in the bulk of the command code), a command was added by extending Eclipse's AbstractHandler. In Emacs+ the base handler is the abstract class EmacsPlusCmdHandler which contains many common support routines and which the other Emacs+ handlers extend. Handlers are invoked from the framework by the execute method which within Emacs+ usually calls a transform method (which may return a new cursor position back to the EmacsPlusCmdHandler once the command is complete).

The project's plugin.xml contains the information that:

  1. Names a command
  2. Associates the named command with its handler
  3. (Optionally) Associates a keybinding with the command

The first two are necessary for a command to be M-x executable and the last, obviously, to give it a key sequence. The primary projects besides Emacs+ exist solely to provide optionally loadable key bindings and essentially only contain a plugin.xml file (along with the necessary pieces to make it a project).

Clone this wiki locally