dk.brics.automaton  |  dk.brics.grammar  |  dk.brics.schematools
Thor  |  TSCheck  |  JSRefactor  |  Artemis  |  TAJS  |  Java String Analyzer  |  XSLT Validator  |  WARlord  |  XSugar  |  Xact  |  JWIG
MONA  |  PALE

JSRefactor - refactoring for JavaScript

These tools are research prototypes and are not intended for production use.

LightRefactor new

LightRefactor is a new plugin for Eclipse for semi-automatic renaming of identifiers in JavaScript programs.

Installation:

  1. Intall Eclipse SDK 4 (Juno)
  2. Install the following using Eclipse's update manager:
    • Xtend 2.4.1 from the Xtend Update Site http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
    • JavaScript Development Tools (JSDT) from the Juno update site ("Programming Languages" category)
    • LightRefactor from the update site http://www.brics.dk/jsrefactor/renaming/

Usage:

  1. Open a JavaScript file in Eclipse's JavaScript editor.
  2. Place the caret on a JavaScript identifier.
  3. Press Ctrl+R to rename that token.

Source code: see the light-refactor github page.

JSRefactor

The JSRefactor plugin is developed to experiment with the technique presented in the paper Tool-supported refactoring for JavaScript published at OOPSLA'11.

To try the plugin, follow these instructions:
  1. Read the limitations above and make sure you understand them.
  2. Add this update site to Eclipse: http://www.brics.dk/jsrefactor/eclipse
  3. Install the plugin available from the update site. It may take a long time for Eclipse to resolve its dependencies.
  4. Open a JavaScript file in Eclipse's JavaScript editor.
  5. These three refactorings should now be available from the menu called "Refactoring":
    • Rename property (do not confuse with the existing refactoring simply called rename)
    • Encapsulate property
    • Extract module
    At the time of writing, the refactorings are not available in the right-click menu, nor do they have shortcuts.
Currently, this plugin has some noteworthy limitations: The underlying framework imposes other drawbacks that you should also be aware of:

Please send questions and comments to asf@cs.au.dk;amoeller@cs.au.dk.