Joint Compillation Java / Groovy at the Groovy Eclipse Plug-in [message #258846] |
Mon, 23 February 2009 11:00 |
Eclipse User |
|
|
|
Hi all,
We from the Groovy Eclipse plug-in Team have a question where we need
some help from you eclipse people.
http://groovy.codehaus.org/Eclipse+Plugin
Our problem:
In Groovy it is possible to mix up Groovy and Java classes. Imagine the
following setting.
Class A in Java A.java
Class B extends A in Groovy B.groovy
Class C extends C in Java C.java
The standalone Groovy Compiler solves such a problem like this:
1. It generates stub classes (like Interfaces for this class) to enable
the Java compiler to run.
2. The Java compiler runs and generates the .class files for all Java files.
3. The Groovy compiler now cam compile the real .class files for the
Groovy sources.
http://blackdragsview.blogspot.com/2007/07/joint-compilation -in-groovy.html
This solution works well in a standalone compilation. We are now trying
to enable this functionality in the Groovy Eclipse plug-in where we
would like to use the eclipse Java compiler which is enabled in normal
Java projects in Eclipse.
I had the following idea to solve this.
The Eclipse Java compiler compiles the Java classes. Using the extension
point org.eclipse.jdt.core.compilationParticipant I attach a Class which
can generate the stubs of the groovy classes for the Java compiler
before compiling.
But how can we make those files (ideally not real files on the file
system) visible to the Eclipse Java compiler?
Can anyone of you give us some tips how to realize such a solution, or give
us some hints if we are completely off the track.
Thanks
Cheers Mike
--
Michael Klenk
Institut für Software - http://ifs.hsr.ch - +41 55 222 4625
HSR Hochschule für Technik Rapperswil
Oberseestr 10, Postfach 1475, CH-8640 Rapperswil
|
|
|
Powered by
FUDForum. Page generated in 0.03392 seconds