ACM Home Page
Please provide us with feedback. Feedback
Advanced refactorings in eclipse
Full text PdfPdf (56 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications table of contents
Vancouver, BC, CANADA
DEMONSTRATION SESSION: Demonstrations table of contents
Pages: 8 - 8  
Year of Publication: 2004
ISBN:1-58113-833-4
Authors
Robert Fuhrer  IBM T.J. Watson Research Center, Hawthorne, NY
Frank Tip  IBM T.J. Watson Research Center, Hawthorne, NY
Adam Kie|un  MIT Computer Science & AI Lab, Cambridge, MA
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 28,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1028664.1028669
What is a DOI?

ABSTRACT

We will demonstrate several advanced refactorings for Java that have been implemented in the context of the Eclipse development environment for Java (see <b>www.eclipse.org</b>). These refactorings are semantics-preserving program transformations that are typical of the sorts of transformations object-oriented programmers perform manually in order to improve the structure of existing code, and to promote reuse, clarity, and extensibility.

Our demonstration will consist of three parts: (i) a quick review of the implementation in Eclipse of several widely-used refactorings such as <sc>Extract Method</sc>, <sc>Introduce Factory</sc> and <sc>Change Method Signature</sc> as described in Fowler's seminal book on refactoring, (ii) a demonstration of generalization-related refactorings such as <sc>Extract Interface</sc>, for extracting an interface from a class in order to reduce client dependencies on implementation particulars, and <sc>Generalize Type</sc>, for remediating over-specific declarations, and (iii) a demonstration of <sc>Genericize Container Uses</sc>, a refactoring that we are currently developing for migrating occurrences of standard container classes such as <b>ArrayList</b> or <b>HashMap</b> in a user's program to instantiations of the generic versions of these container classes in Java 1.5 (e.g., <b>ArrayList<String></b>). This involves determining the element types that flow into each container object, modifying their declarations and allocations sites where possible, and removing casts that have been rendered redundant.

The latter two categories of refactorings involve non-trivial static analysis, as well as challenging usability issues from a software engineering perspective, which reflect the complications that programmers face when performing the transformations manually. Therefore, during each demonstration, we will give a brief overview of the technical challenges that the refactorings present, along with highlights of the approach we took in addressing them. In particular, we will briefly describe a new piece of Eclipse infrastructure designed to help implement various kinds of context-sensitive and context-insensitive type and pointer analyses for Java.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
2
 
3
Integrating Refactoring Support into a Java Development Tool", Dirk BÄaumer, Erich Gamma, Adam Kieżun, OOPSLA 2001 Companion.
 
4
Eclipse "New and Noteworthy" page describing Extract Interface: http://fullmoon.torolab.ibm.com/downloads/drops/R-2.1-200303272130/whats-new-jdt-refactor.html Eclipse "New and Noteworthy" page describing Generalize Type and Introduce Factory: http://fullmoon.torolab.ibm.com/downloads/drops/S-3.0M5-200311211210/eclipse-news-part1-M5.html

Collaborative Colleagues:
Robert Fuhrer: colleagues
Frank Tip: colleagues
Adam Kie|un: colleagues