Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Creating a project programatically?
Creating a project programatically? [message #1049] Wed, 04 April 2007 23:37 Go to next message
Mark Howe is currently offline Mark HoweFriend
Messages: 14
Registered: July 2009
Junior Member
What is the correct way to add the default interperter (and it's paths) to a newly created project
(created programatically). Snippet:

....create/open IProject ...setNatures...
IDLTKProject rubyProject = DLTKCore.create(newProject);
List<IBuildpathEntry> entryList = new ArrayList<IBuildpathEntry>();
entryList.add(DLTKCore.newSourceEntry(newProject.getFullPath ().append( "app/controllers")));
....other paths....
entryList.add(ScriptRuntime.getDefaultInterpreterContainerEn try());
rubyProject.setRawBuildpath(entryList.toArray(new IBuildpathEntry[entryList.size()]), null);
....

The paths like "app/controllers" are added correctly but the defaultInterpreter isn't. No
Interpreter paths show up and the Interpreter displays (unbound). Any idea what I'm missing?

Thanks
Mark
Re: Creating a project programatically? [message #1077 is a reply to message #1049] Thu, 05 April 2007 10:10 Go to previous message
Eclipse UserFriend
Originally posted by: mikhail.kalugin.xored.com

Hi,

This code looks right. Please, check following things:
1. Nature for project was set correctly.
2. There are registered interpreters with such nature.
3. Try to update code from CVS. Today I've discovered some bugs with
container resolving and fixed it.

--
Mikhail Kalugin

Mark Howe wrote:
> What is the correct way to add the default interperter (and it's paths)
> to a newly created project (created programatically). Snippet:
>
> ...create/open IProject ...setNatures...
> IDLTKProject rubyProject = DLTKCore.create(newProject);
> List<IBuildpathEntry> entryList = new ArrayList<IBuildpathEntry>();
> entryList.add(DLTKCore.newSourceEntry(newProject.getFullPath ().append( "app/controllers")));
>
> ...other paths....
> entryList.add(ScriptRuntime.getDefaultInterpreterContainerEn try());
> rubyProject.setRawBuildpath(entryList.toArray(new
> IBuildpathEntry[entryList.size()]), null);
> ...
>
> The paths like "app/controllers" are added correctly but the
> defaultInterpreter isn't. No Interpreter paths show up and the
> Interpreter displays (unbound). Any idea what I'm missing?
>
> Thanks
> Mark
>
Previous Topic:Is there DLTK user guide available?
Next Topic:Default Package
Goto Forum:
  


Current Time: Mon Dec 22 20:46:54 GMT 2014

Powered by FUDForum. Page generated in 0.02007 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software