CodeMirror RAP/RWT Widget

 CodeMirror is a JavaScript library that can be used to create a relatively pleasant editor interface for code-like content ― computer programs, HTML markup, and similar. If a mode has been written for the language you are editing, the code will be coloured, and the editor will optionally help you with indentation.

CodeMirror is used for Java (Beanshell) script editor in the new Rhei system. It is embedded in an Eclipse RAP/RWT widget. It can be used just like the standard text area but with additional features:

  • code highlighting
  • matching bracket highlighting
  • code indentation
  • line numbers


The CodeMirror RWT widget does not have dependencies to POLYMAP code and can be used in other RAP applications just like our OpenLayers widget.

The current code is a proof-of-concept that shows that CodeMirror works together with the RAP/qooxdoo JavaScript system. The widget code is simple yet and does not support much of the CodeMirror API. But even by now the CodeMirror looks very cool inside the POLYMAP3 workbench and works well and fast :)


Trac Appliance - Powered by TurnKey Linux