Kohsuke Kawaguchi a écrit :
> Benoit Callebaut wrote:
>
>> I think that we need to think to a more generic API.
>> For example something like a tree structure with standards functions
>> like "add" "remove" (I think to JTreeNode) and a visitor pattern to
>> generate the code.
>
>
> For example, JBlock already has add method. It doesn't make much sense
> for things like binary operation to have add/remove methods.
>
> Visitor on expressions are something we could consider, but what are
> you going to use it for?
>
>> I am not wrong, this current API is not part of the JAXB
>> specification but only of the JAXB-RI. So , it may change at any
>> moment and maybe replaced by something better.
>
>
> It is correct that changing API is not as heavy-weight as changing the
> JCP-governed JCP API. But we still need to pay attention to existing
> applications that use the API. So I'd be bit skeptical about drastic
> changes to the codemodel API.
>
>> What I propose is to discuss more in detail what the needs are and
>> see if we can write a draft document with possible modifications to
>> the API (along with patches and sample uses in plugins)
>
>
> But I think discussions in detail seems useful. Do you have anything
> in particular that you'd like to fix? Should this discussion move to
> users_at_codemodel.dev.java.net?
Good idea.
I need to make a deeper analysis of what I can do with the actual API,
what is difficult to do and what is not possible before asking changes.
My first intention was to launch the discussion about possible changes
to the API to avoid chaotic changes/proposition to the API.
I need to share my ideas on it an receive feedback on points like :
* understand design choices in the codemodel
* show with code snippets what I don't like in the API or the use I make
of it and receive feedback on it.
So your idea to move the discussion seems really good to me. Anything
that can improve the codemodel without breaking the great job already
done is fine for me.
I don't want to break JAXB (or someone else do) because, I had
nightmares after SUN broke the compatibility in JAXB 1 (or pre 1.0).
>
>