[ANN] PreconditionPlugin
Hi all,
Here comes my first plugin (hold your horses), a precondition generator, ie
a tool that inserts assert statements at the begginning of a method for
validating input arguments.
How does it work?
Pressing Shift-Ctrl-T shows a dialog in which you can select one of the
current classes methods and for each argument specify a precondition. When
pressing OK the specified assert statement are generated into the code.
Available preconditions are configured in an external preconditions.xml file
which maps preconditions and their error messages to specific types. The
plugin "understands" inheritance and implementation, ie configuring a
precondition for java.util.List will also make it applicable on
java.util.ArrayList. Have a look at the file included and you'll get the
hang of it..
Read more about it and/or download from
http://www.intellij.org/twiki/bin/view/Main/PreconditionPlugin
regards!
/Ole
Please sign in to leave a comment.
Couldn't get it to work. When I clicked on "OK" on your dialog box, I got an internal error, and the following exception:
oops.. thanks for the report..
the plugin excpects your classes to be inside a package, I guess yours is
not?
I'll fix this tonight!
regards,
/Ole
"Tobin Juday" <tsjuday@checkfree.com> wrote in message
news:7346985.1038241360508.JavaMail.jrun@is.intellij.net...
an internal error, and the following exception:
>
Nope, it's not in a package. I just threw a little java file together to see your plugin work.
Tobin