Check My Vars

Compatible with  IntelliJ IDEA
30.10.2008
2 783
Generate code according to Annotation

Configure template to generate code depending on annotation and type of parameter.
For example, code like:
public void minMaxNumber(@MinMax(min = 1, max = 5)int nb) {
}

Can generate this:
public void minMaxNumber(@MinMax(min = 1, max = 5)int nb) {
if (nb < 1 || nb > 5) {
throw new IllegalArgumentException("nb value must be between 1 and 5 (inclusive)");
}
}


Action is available under "Generate..." menu.
On first use, the plugin will ask you to generate a sample if it found nothing to generate.


Future release will include a support for javadoc tag as an alternative to Annotation, so JDK 1.4 or earlier users can use this plugin

Download plugin

Version

Update date

01.07.2011
Superb article mate but how do get your rss feed? Please sending us an e-mail with instructions? Ta
Please  sign in  to leave a comment.