[osg-users] Eclipse-CDT and OSG headers
Maik Beckmann
beckmann.maik at googlemail.com
Sun Apr 27 04:36:21 PDT 2008
Robert Osfield <robert.osfield at ...> writes:
> Does it support globbing at all? I.e take all the files in the follow
> subdirectories.
>
> All OSG headers that are extension less can be found in include/*/*
This sound reasonable, but doesn't work :)
> > I fear one has to write a eclipse plug-in which determines the type for
> > given files and append them to the content-type-registry via full filename.
>
> Or perhaps the the Exclipse dev's (or a member of the community) could
> just fix it so that its C++ support includes support for Standard C++
> style extensionless headers...
I don't know it for sure, but I fear this is not an issue the CDT devs can solve
without reworking the hole content type approach of the eclipse platform. Even
they work around this problem by listing the names of the C++-STD headers:
memory,algorithm,...
> Another possibility might be to use CMake to build the list of header
> files (they are already listed in the CMakeLists.txt)
Hm, I will look into this.
However, this is a workaround:
1. check out osg as an Makefile-Project
2. navigate to project Properties -> C/C++ General -> File Types
3. click the "use project settings" radio button
4. add *.cpp as C++-Source File type
5. add Foo as C++ Header File
Eclipse created a new subdirectory
.settings
where you can find
org.eclipse.core.runtime.prefs
which contains
<content>
content-types/org.eclipse.cdt.core.cxxHeader/file-names=Foo
content-types/org.eclipse.cdt.core.cxxSource/file-extensions=cpp
</content>
We want to replace Foo with a comma separated list of all osg header names (not
their path!)
6. Start a unix shell (ie. bash or msys on windows), navigate into the
include folder and do
$ find|grep -v [.]svn > ../log
7. open log and rework it to a list like this
TerrainManipulator
MatrixManipulator
Export
...
8. search for the regex "\n" and replace it with ","
9. copy all and replace Foo in org.eclipse.core.runtime.prefs with it.
10. refresh the project and you are done.
This will take 5-10 minutes. It's not nice, but it works.
Best,
-- Maik
More information about the osg-users
mailing list