Add proof-of-concept compile time code generator

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Generate sources even in Eclipse, but only with a full build

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Generate the sources into target/generated-sources/from-template/

It is much better not to conflate generated sources with non-generated
sources. We employ the 'add-sources' goal of the build-helper plugin.

For Eclipse, happily, m2e already has support for imitating the workings
of the build-helper plugin. The support is on the m2e marketplace;
during the import of the Maven project, m2e will suggest to install it.
If it was imported previously, right-clicking on the error message will
suggest to install it, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
mailmap: fix Michael Zinsmaier author name
Move Cancelable logic to abstract base class
POM: bump to pom-scijava 1.150
Add a test-scope dependency on junit-benchmarks

This framework taps into JUnit and allows to make beautiful graphs and
performance regression tests based on records of previous runs.

To accomodate junit-benchmarks, we have to upgrade the junit dependency
to version 4.11.

Since upstream junit-benchmarks has a bug where it includes all @Before
and @After methods in the timing, we use our own forked version, as per
pom-scijava.

For a junit-benchmarks tutorial, see:

	http://labs.carrotsearch.com/junit-benchmarks-tutorial.html

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Turn AddOpBenchmark into a JUnit Benchmark

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Turn the MapperBenchmark into a JUnit Benchmark

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Turn ChunkExecutorBenchmark into a unit test

As some of the operations are ghastly expensive, let's enable them only
when the system property imagej.ops.expensive.tests is set to "enabled".

To see that this commit actually renamed the original file, inspect it
via with "git show -M40 --histogram".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'junit-benchmarks'

This topic branch brings a whole new world of testing with it: JUnit
benchmarks. Properly configured, it will even allow us to catch
performance regressions by taking into account previous runtimes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Standardize benchmark tests on 20 runs, one warm-up round

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Fix Beanshell example in the README

For consistency, we will call the gateway function op(), not
ops(). Also, the map() function needs to be called on the OpService,
not the gateway.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add two ops necessary for the using-ops tutorial

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Show a question mark next to optional parameters

Closes #7.

@dscho and I discussed putting the optional arguments in square brackets
as is the usual convention with optional CLI tool arguments, but I think
it is harder to read than the question mark notation.

And the question mark notation was easier to code. ;-)
DefaultOpMatchingService: deal with invalid ops

If an op is invalid (e.g., it has an @Parameter with the "final"
keyword), it should never match anything.

We should also warn that the op is invalid in its op string.

It would be ideal to also explain *why* the op is invalid, but that task
can wait for another day...
Fix bug in optional parameter matching
Do not try to assign null inputs

Null values are meant to indicate an optional parameter whose value
should be left as default.
OpMatchingServiceTest: fix testOptionalParams

The test was not enabled, and had a couple of bugs:

1) The OptionalParams op had final parameters, which is illegal.

2) The OpMatchingService#findModule method throws
   IllegalArgumentException, rather than returning null, when there is
   no match.
DefaultOpService: sort the list of operations