>
> If you use The "direct" method to inject String as a code fragment,
> CodeModel can't figure out what classes are used there, so it can't help.
>
> We can't really just let you "add package imports to the beginning of
> the generated class", because until we complete the generation of a
> while compilation unit, we can't really determine what classes can be
> imported and what cannot.
Wouldn't it be nice to let CodeModel "register" some "direct" imports, so
that it can have them appended to the import-set when it's ready to do so ?
> say, commons-lang-toString plugin and/or xstream-toXml plugin?
>
Hmm ... but wouldn't that lead to a plugin proliferation problem ? How
about the alternative of something like commons-lang-plugin or
xstream-plugin, which would be less specific but still imply the stuff being
used. So commons-lang can be used for implementing toString() or hashCode()
or equal, etc., as configured by the plugin user.
Hanson