CodeHaggis is an eclipse code generation plugin for java,
which depends on the CodeSugar
plugin from Vova Grechka and Miguel Griffa. The last update to that
plugin was made more than two years ago. So I made some changes and
updates to CodeSugar. I call the developers, but nobody answers my
mail. Now I think this project is dead, but it is too good to decline
it, so I decided to make a fork from that project.
CodeHaggis supports code generation, with clone, compareTo, equals,
toString, serialVersionUID, hashCode methods, etc. It does not have
dependencies to other projects and has a console file logger and a
specific get/set generation. Additionally you can print java source
code in a colored form with linux.
Functionality
CodeHaggis has the following functionalities:
Automated code generation of
- clone()
- compareTo()
- equals()
- hashCode()
- toString()
Additionally the Creation of
- serialVersionUID variable
- JUnit Test case updater
- lazyFild
- Enumerations
- special and fast get and setter method creation
Some Editor Functionalities:
- Console Logger, which stores the console output of a programm to a file
- The printing of
java source code files in color with linux, but without installing XPrint
(CVS or Version 1.2)
(Black and white printing was easy: http://www.eclipse.org/swt/faq.php#printOnX)
(That changes everything: http://www.eclipsezone.com/eclipse/forums/t73132.html)
Usage
The usage is very easy:- For the
clone, compareTo, equals, hashCode, toString and serialVersionUID, you
have to choose an Editor View or a class in the Package Explorer or a
class or field in the Outline View.
- To
enable the Console Logger, you have to choose the Console Logger
push button. After that, it is enabled, it logs the console output into a
file. Its file name and path is specified in the Prefernce Page.
- To print
colored source code with linux, you have to install the htmldoc
software to your distribution or something similar, which makes a pdf
or ps file from a html source. In debian you can get this software
package with apt. First I tried to use html2ps, but it makes a
terrible output in black and white.
Installation
Download the ziped CodeHaggis file from the Sourceforge download page and unpack it. The directory in the plugin folder has to be moved into the ../ecipse/plugins/ directory. Close and restart your eclipse instance and voila, that's all. Now, I hope, you can see a "Haggis" entry in your context menu.
Change Log since CodeSugar
CodeHaggis change.log.
Similar Projects
This projects are quite similar to the CodeHaggis Plugin. But Commons4e and Commonclipse depend and need alien libraries for their function.
CodeSugar
Commons4e
Commonclipse