-
Notifications
You must be signed in to change notification settings - Fork 0
Using Eclipse with JRuby Truffle
Eclipse is an alternative IDE for editing JRuby+Truffle. It provides much better feedback from the Truffle DSL annotation processor and actually keep the project built at all times.
However the build is not shared with Maven to avoid conflicts when Maven builds. Also, as normal JRuby runs from a jar it is not trivial to run from Eclipse compiled .class files.
Create a new workspace in Eclipse (>= Luna).
Start by ensuring there is no leftover configuration:
$ rm -rf {core,truffle}/{.classpath,.settings,.project}We can now import the two projects:
- From the main menu bar, select
File>Import... - Select
Maven>Existing Maven Projects - Select
jruby/coredirectory as root directory (NOT just jruby) - Click
Finish - Repeat with
jruby/truffleas root directory
And now enable the Truffle annotation processor:
- Select the
truffleproject - Right click and choose
Properties - Select
Java Compiler>Annotation Processing - Click on
Enable project specific settings, thenOK - Click
Yesto rebuild the project
Change the Output folder to not interfere with the Maven build for each project:
- Select the
coreproject - Right click and choose
Properties - Select
Java Build Path - Uncheck
Allow output folders for source folders - In
Default output folder:enter[PROJECT]/build.eclipse(with[PROJECT]replaced bycorehere) - Select
Yeswhen asked about removing generated resources in the old location - Repeat with the
truffleproject
You shall be set!
It is possible to run JRuby with a run configuration for org.jruby.Main.main(). For that you set the working directory to ${workspace_loc} in the Arguments tab.
Further integration is under investigation.