I've installed the Dynamic Languages Toolkit (DLTK) in Eclipse 3.6. But I can't figure out how to create a Ruby file in an existing Java project.
Doing the obvious thing (New -> Empty Ruby Script) just gives the error message "Source folder is not a correct project". Do I have to modify the project in some way to tell DLTK that it's OK to add Ruby files to it?
(Adding the file outside of Eclipse does work.)
Do the following steps (has worked for me):
New file
and enter in the dialog the filenamemy_file.rb
. The essential part is the extension, because this will ensure that the ruby mechanisms are in place.def
and pressCTRL-SPACE
, you should see as a result the list withdef - method definition
(the template),def
anddefined?
. This is all part of the ruby text editor.So it is possible to mix java and ruby files in the same project, that has as nature java. The only thing I has noticed is that the run menu entry only allows you to start the dialog
Run As > Run Configurations...
and enter there the necessary parameters to start your ruby script.