I like this idea.  I think there are some details to work out. 
Most of these are maybe just things I need to learn :-)  Here's a few:

1) Whatever approach we take for this - it would be nice to align with
existing Eclipse support for this kind of thing (I assume there is some,
but I
haven't explored what it is).

2) We have to think about having now 2 places where the same thing is
specified.
If both places are used, do we need to check for "consistency" at run
startup time?

3) Can we have some kind of backwards-compatible approach that achieves
more of
the goals of writing information about configuration parameters in just
one place?  Should
we take some inspiration from how EMF does things, or how Spring support
is done in
Eclipse (Spring uses injection, and has some Eclipse plugins - see for
instance
http://springide.org)

-Marshall

Jörn Kottmann wrote:
> Hello,
>
> I would like to suggest that we use java annotations
> for the classes which implement an AE.
>
> The configuration parameters can be defined via java annotations
> and then injected into the AE before initializing.
> The implementor than does not need to write code that retrieves
> configuration parameters. The framework than can also guarantee
> that all mandatory parameters are set (currently its not possible to
> enforce that
> the implementation is in sync with the configurationParameters section
> in the descriptor.
>
> Here a small sample:
>
> public class SampleAE extends Annotator_ImplBase {
>   @Parameter(mandatory = true)
>   public Boolean booleanParameter; // <- value is injected
> }
>
> What do you think ?
>
> Jörn
>
>

Reply via email to