ABSTRACT
Many automated refactoring tools only work with one programming language. However, most complex programs rely on polyglot programming --- entailing the use of different programming languages, libraries and frameworks. While finding a general solution for extending refactoring across multiple languages is hard, it is simple and possible to support automated refactorings for some common cases that programmers already encounter in their programs today. Supporting those common cases is essential in encouraging programmers to make changes that would increase the understandability and maintainability of their programs.
This paper is a step toward encouraging tool developers to think about supporting multi-language refactorings. We present our tool for supporting multi-language refactorings from studying the interactions between Java and XML configuration files. Our tool extends Rename Refactoring support across three different popular Java frameworks: Struts, Hibernate and Spring.
- Apache Foundation Struts Framework. http://struts.apache.orgGoogle Scholar
- Eclipse Foundation. http://eclipse.orgGoogle Scholar
- Creating a JSP Document http://java.sun.com/javaee/5/docs/tutorial/doc/bnajq.htmlGoogle Scholar
- Martin Fowler, Kent Beck, John Brandt, William Opdyke, and Don Roberts. Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, 1999. Google ScholarDigital Library
- Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman, 1995. Google ScholarDigital Library
- IntelliJ IDEA. http://www.jetbrains.com/idea/Google Scholar
- The Language Toolkit: An API for Automated Refactorings in Eclipse-based IDEs http://www.eclipse.org/articles/Article-LTK/ltk.htmlGoogle Scholar
- Don Roberts, John Brandt and Ralph Johnson. A Refactoring Tool for Smalltalk. Theor. Pract. Object Syst. 3(4):253263, 1997 Google ScholarDigital Library
- Don Roberts and Ralph Johnson. Evolving frameworks: A Pattern Language for Developing Object-Oriented Frameworks. In Pattern Languages of Program Design 3. Addison Wesley, 1997.Google ScholarDigital Library
- XML Path Language (XPath). http://www.w3.org/TR/xpathGoogle Scholar
Index Terms
- Toward refactoring in a polyglot world: extending automated refactoring support across Java and XML
Recommendations
Cross language refactoring for Eclipse plug-ins
WRT '08: Proceedings of the 2nd Workshop on Refactoring ToolsThis article presents our research on how a cross-language refactoring could be implemented in an Eclipse Plugin.
A non-Java language running on the Java virtual machine JVM interacts with Java code. Refactorings in either language might break the code ...
Polyglot: an extensible compiler framework for Java
CC'03: Proceedings of the 12th international conference on Compiler constructionPolyglot is an extensible compiler framework that supports the easy creation of compilers for languages similar to Java, while avoiding code duplication. The Polyglot framework is useful for domain-specific languages, exploration of language design, and ...
Toward automated refactoring of crosscutting concerns into aspects
Aspect-oriented programing (AOP) improves the separation of concerns by encapsulating crosscutting concerns into aspects. Thus, aspect-oriented programing aims to better support the evolution of systems. Along this line, we have defined a process that ...
Comments