Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse magic/opaque folder semantics(How to get eclipse to recognise the semantics of certain folders)
Eclipse magic/opaque folder semantics [message #1032806] Wed, 03 April 2013 13:05 Go to next message
T L is currently offline T LFriend
Messages: 2
Registered: April 2013
Junior Member
Hi,
I find that Eclipse is great when it's all set up and running but importing existing code and creating projects can often be more challenging that perhaps it should be.
One recent example is an android project I've imported that has a 'jni' folder - eclipse fails to recognise this as a folder containing C sources so the context menu properties lacks certain options that I'd expect to find there (C/C++ Build & C/C++ General). The project doesn't have a '.cproject' file so I copied one over from a locally wizard generated project - it appears to have some magic metadata that should tell eclipse that the directory contains C++ source and provide the options but this silently fails to work, which either means that data isn't stored in the '.cproject' file or that I can't just copy the file from one place to another (I couldn't spot anything specific to any one project in there).

Where does Eclipse store the information that tells it how to treat folders and would it be possible for the IDE to be helpful/smart enough to infer this data when it is missing and to then ask the user if they would like to have it automatically generated?

Thank you for reading,
T.Lewis.
Re: Eclipse magic/opaque folder semantics [message #1033344 is a reply to message #1032806] Thu, 04 April 2013 06:25 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1968
Registered: July 2009
Senior Member
Is the "jni" folder part of a C/C++ project? Then you can add it in Project Properties->C/++ General->Paths and Symbols in the tab "Source Location" (default is to include the whole project tree).

Or is "jni" a separate project? Then you can convert it to a C/C++ project
- Open File menu and select New->Convert to a C/C++ project
- in the upcoming dialog you can then select your jni project
(just copying the .cproject file is not enough; the C/C++ nature must be set in the .project file; otherwise Eclipse will not read the .cproject file)


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Eclipse magic/opaque folder semantics [message #1033543 is a reply to message #1033344] Thu, 04 April 2013 10:53 Go to previous messageGo to next message
T L is currently offline T LFriend
Messages: 2
Registered: April 2013
Junior Member
Thanks for that. Can I ask where this information is stored so that, should I want to migrate my project to another machine, directory or back it up with source control, I don't have to waste time second guessing the IDE? Is it just in the .project and .cproject files or are there some other bits of vital information scattered around various files in .workspace?
Thank you.
Re: Eclipse magic/opaque folder semantics [message #1034387 is a reply to message #1033543] Fri, 05 April 2013 11:28 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1968
Registered: July 2009
Senior Member
All things are stored in the .project and .cproject files. For some projects there is also a folder called .settings which is needed. You should use the import project function in Eclipse.

All files in .workspace are not meant for copying (they are specific for the current workspace directory, your plugin version etc.).


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:External library includes not resolved (sometimes) in project generated from cmake
Next Topic:installing GDB (Win)
Goto Forum:
  


Current Time: Thu Nov 27 12:16:25 GMT 2014

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

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