Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lua Development Tools » LDT features inside CDT project
LDT features inside CDT project [message #794082] Wed, 08 February 2012 22:30 Go to next message
Robert Green is currently offline Robert Green
Messages: 3
Registered: December 2010
Junior Member
Our projects are CDT projects which have an assets/script directory containing all of the lua files. I can't seem to find a way to get any of the benefits besides syntax highlighting with this configuration, and having a separate project just for lua files doesn't make sense because we often edit the C++ code of the backing engine from which lua extends.

What are good solutions?

Thanks
Re: LDT features inside CDT project [message #797708 is a reply to message #794082] Mon, 13 February 2012 20:36 Go to previous message
Benjamin Cabé is currently offline Benjamin Cabé
Messages: 151
Registered: July 2009
Location: Toulouse, France
Senior Member

Hi Robert, and sorry for the late reply,

I see two ways for you to benefit from LDT features in a C/C++ project:

1. The solution which I think would be the most elegant is to give your CDT project the LDT nature. I have opened a bug to automate this, but in the mean time, you'll have to edit your .project file by hand.
In the <buildSpec> section, you should add
<buildCommand>
	<name>org.eclipse.dltk.core.scriptbuilder</name>
	<arguments>
	</arguments>
</buildCommand>

And in the <natures> section:
<nature>org.eclipse.koneki.ldt.nature</nature>

From this point, your project will behave not only as a CDT project, but as an LDT project as well. It means you will be able to right click on a folder, and choose "Build Path > Use as Source Folder" on the folders containing your Lua files.

2. The alternative way is to create a new Lua project in your workspace. In this project, create a new virtual folder (see related help topic) linked to the folder containing your Lua sources. Then, right click on the folder, and choose "Build Path > Use as Source Folder".


Hope this helps!
I am looking forward to further comments from you regarding the use of LDT together with CDT, since I believe it is a very common use case and there's certainly room for improvement! Smile
Previous Topic:Syntax Coloring
Next Topic:Cannot use any LTD feature on Mac
Goto Forum:
  


Current Time: Wed Oct 22 13:53:10 GMT 2014

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

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