Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Convert constants to enum

This is part of my (Bina Patel) proposal for Google Summer of Code 2009. I've listed a link to the entire proposal at the bottom.






Project Summary

Convert Constants to Enum Refactoring

This project aims to develop an intuitive and standardized graphical user interface (GUI) as well as construct a full suite of robust test-cases for a research prototype refactoring plugin named “Convert Constants to Enum.” The plugin refactors Java legacy code to make use of the new enum program construct which was introduced in Java 1.5. This construct, which provides language support for enumerated types, is one of many new features of Java that offer significant improvements over older Java technology. Prior to Java 1.5, programmers were required to employ various design patterns (e.g., static final int ...) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. The Convert Constants to Enum refactoring for Eclipse provides an automated approach for transforming legacy Java code to use the new enumeration construct. This semantics-preserving tool increases type safety, produces code that is easier to comprehend, removes unnecessary complexity, and eliminates brittleness problems due to separate compilation. There are several features currently lacking in the plugin which are obstacles to wide distribution including a robust graphical user interface, a full test suite with regression tests, and conformance with other refactoring plugins in Eclipse, e.g., undo functionality, refactoring history, refactoring preview pane.


More Information

Please consult: http://www.cse.ohio-state.edu/~patelbin/bina_gsoc09.pdf for the full proposal

--Binadpatel.gmail.com 16:03, 3 April 2009 (UTC)

Back to the top