Hi Stephen, Charles, On Mon, Dec 28, 2009 at 10:32 AM, Charles Oliver Nutter <[email protected]> wrote: > 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 probably just don't get what Stephen is trying to do, but I do use Eclipse from time to time, especially for debugging JRuby, and JRuby project should work in Eclipse right out of the box. Yes, it can use Ant builder to compile JRuby the way JRuby should be compiled (via the official build). This all work just fine for me (when I modify sources, they are immediately compiled into eclipse-specific directory in order not to interfere with ant build), and when I need to get the fully working JRuby, I just do Ctrl-B and eclipse starts the ant build. For debugging, I start jruby with special parameters in the command line and that attach to that process via the designated port. # cat bin\jruby-debug.bat @jruby.exe -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,address=3232,suspend=y %* It seems to me that trying to match what Ant build does via Eclipse-specific configuration is not straightforward and error-prone, and would take quite some time, while just using Ant builder is simple and clean solution. Am I missing something here? Maybe, speed considerations? But at any rate, doing all the things in Eclipse tha Ant build already does would also not be that much faster... Thanks, --Vladimir >> 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 > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
