polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <p...@nosphere.org>
Subject Re: Groovy support is somewhat broken.
Date Fri, 31 Jul 2015 08:41:18 GMT

GroovyMixin works 'à la' scripting.
It loads groovy code from resources.

Maybe that's what makes IDEA go wild.
With Netbeans I have no issue using GroovyMixin IF the .groovy files
resides in src/main/resources instead of src/main/groovy as it then must
be considered as plain resources, note code that is part of the classpath.

Note that Groovy and Zest are perfectly usable without this Groovy Mixin.
See https://zest.apache.org/java/develop/lang-groovy.html


Niclas Hedhman a écrit :
> The way the GroovyMixin works is that it locates a Groovy file with the
> same name as the Mixin that it is to implement, only difference is the
> .groovy instead of .java.
> That seems to work in runtime, but IDEA doesn't like it, when Groovy plugin
> is installed. It protests that there are two classes with the same name in
> the same package (kind of rightly so).
> Also, in the Java world, the Mixin implementation is not bound to "per
> interface", but solely to the Method (incl the method's declaring class).
> So, I wanted like to change the GroovyMixin to resolve the implementation
> in some other manner, like;
> module
>     .forMixin( Mixin1.class )
>     .setMetaInfo( new String[]{ Do1Impl.class.getName() } );
> or something similar. BUT, that is not really possible, since
> AppliesToFilters can not get any injections from @Structure or elsewhere,
> so it is not possible to pick up.
> Can anyone think of any other way to do a "second level" (generics-like)
> declarations for telling a Mixin which implementation to use?
> Cheers

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message