On Sun, Dec 27, 2009 at 3:52 PM, Stephen Bannasch
<[email protected]> wrote:
> I'm trying to get jruby building in eclipse so I can use the debugger to
> investigate an issue in jruby's java code. I'm having trouble getting the
> annotations processed correctly.
>
> Caveat: I don't have much experience with annotations ...
>
> Right now the compiler is set to JDK 1.5 and I've added the following jars
> to the classpath for building:
> build_lib/junit-4.7.jar
> build_lib/livetribe-jsr223-2.0.6.jar
Open a bug to track your "getting things to build in Eclipse"
progress. I know we've let it decay since most of us use NetBeans (and
to think, a few short years ago, we would not have bothered even
trying NetBeans!)
> I've also enabled project-specific Annotation processing and set the
> generated source directory to src_gen.
>
> In the project settings for Annotation Processing/Factory Path I added the
> build_lib/apt-mirror-api.jar.
>
> I'm generating lots of code in src_gen/ but Eclipse reports the code has
> errors like:
>
> "The declared package org.jruby.gen does not match the expected package"
>
> The generated class file output into src_gen is flat -- it should probably
> be in a dir structure that maps to the package structure. I haven't set any
> annotation processor options in eclipse yet ... perhaps there is an option
> for generating the code into the proper package dir structure?
Yes, I think you're right...they should be generated into the proper
package structure. NetBeans didn't care, but that's probably just
lucky happenstance.
> I realize I also don't understand the compile-annotation-binder ant task
> which has javac compile the following:
>
> org/jruby/anno/FrameField.java
> org/jruby/anno/AnnotationBinder.java
> org/jruby/anno/JRubyMethod.java
> org/jruby/anno/FrameField.java
> org/jruby/CompatVersion.java
> org/jruby/runtime/Visibility.java
> org/jruby/util/CodegenUtils.java
>
> Is this creating a new annotation factory?
>
> How can this be represented in Eclipse?
These are a minimum set of classes necessary to run the
AnnotationBinder class which creates all the *Populator classes. I
believe this would be a pre-build step we'd need to add to the
project. I have not monkeyed with Eclipse projects in a while...
> There's also the _gmc_internal_ ant task which generates invokers and
> compiles populators -- ho should this be integrated.
Similar case to the above stuff.
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email