This plugin is part of a research prototype developed to experiment with the technique presented in the paper Tool-supported refactoring for JavaScript published at OOPSLA'11. It is not ready for production use.
Currently, the integration with Eclipse has some noteworthy limitations:- It does not work on JavaScript embedded in HTML files.
- It does not refactor multiple files. All your JavaScript code is assumed to be in the same file.
- The warnings produced by the tool are not always that helpful.
- Dead code is ignored. You may be surprised if you try to refactor a half-complete program.
- And therefore, it does not work well on library code.
- If your code is very complex, the underlying pointer analysis may take a long time and/or use lots of memory.
- Read the limitations above and make sure you understand them.
- Add this update site to Eclipse: http://cs.au.dk/~jhckragh/update/
- Install the plugin available from the update site. It may take a long time for Eclipse to resolve its dependencies.
- Open a JavaScript file in Eclipse's JavaScript editor.
- 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