SpartanRefactoring / Main

Eclipse plugin that performs automatic refactoring of Java source code, making it shorter, more idiomatic and more readable
https://www.spartan.org.il
100 stars 56 forks source link
eclipse-platform eclipse-plugin refactorings spartan-programming

Installation Instructions | Video Demo | Background | User Manual | Theoretical Background | Developer Guide | Tippers' List

Development Status

Build Status codecov

Articles

The Spartanizer is:

The Spartanizer applies the principles of Spartan Programming to your Java code. It applies many different tippers, which are little rules that provide suggestions on how to shorten and simplify your code, e.g, by using fewer variables, factoring out common structures, more efficient use of control flow, etc.

The Spartanizer help you make a sequence small, nano-refactorings of your code, to make it shorter, and more conforming to a language of nano-patterns. The resulting code is not just shorter, it is more regular. The spartanization process tries to remove as many distracting details and variations from the code, stripping it to its bare bone.

This includes removal of piles of syntactic baggage, which is code that does nothing, except for being there: curly brackets around one statement, initializations which reiterate the default, modifiers which do not change the semantics, implicit call to super() which every constructor has, fancy, but uselessly long variable names, variables which never vary and contain temporaries and many more. Overall, the Spartanizer has over 100 tippers.

This project was conceived as an academic project in the [Technion - Israel Institute of Technology], and was later developed for several years by different students and members of the Computer Science faculty.

The refactorings made by this plug-in are based on the concept of Spartan Programming, which suggests guidelines for writing short, clean code. There's a lot of reading material on the subject in the project wiki.

License

The project is available under the MIT License