Ok, the actual issue is related to the IDEA Groovy plugin, which auto-compiles the Groovy classes and they end up clashing with the Mixin interface.
I'll leave it for now, and disable the "Test resources" in IDEA, which makes it not do this compilation... Cheers Niclas On Fri, Jul 31, 2015 at 4:41 PM, Paul Merlin <[email protected]> wrote: > Hey, > > 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 > > /Paul > > > 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 > -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
