[osg-submissions] Script to generate the Visual Studio syntax highlighting files automatically.

Валерий Быков valery.bickov at gmail.com
Thu Jan 17 08:37:40 PST 2008


Hi.

Do you know that Visual Studio can map extensionless files to one of
languages? You can find it at menu Tools - Options - Text Editor - File
extensions and check option "Map extensionless files" at bottom of the page.
Select "Microsoft Visual C++" in list.

Valery
-----Original Message-----
From: osg-submissions-bounces at lists.openscenegraph.org
[mailto:osg-submissions-bounces at lists.openscenegraph.org] On Behalf Of
Jean-Sebastien Guay
Sent: Thursday, January 17, 2008 12:04 AM
To: osg-submissions at lists.openscenegraph.org
Subject: [osg-submissions] Script to generate the Visual Studio syntax
highlighting files automatically.

Hello,

For a long time, there have been files in the VisualStudio/ directory which
enabled syntax highlighting for the extensionless header files which OSG
uses.
As new headers (osgShadow, osgViewer, etc.) have been added, these have not
been kept up to date. This annoyed me a bit, not for the highlighting
itself, but because if VC++ doesn't recognize a file as C++, lots of useful
functions do not work (navigation from header to implementation, tracing
through the file while debugging, viewing local variable values, etc.)

I created a quick Perl script to generate the files automatically. It
generates the files for VC7, 7.1, 8 and 9 (though untested on 9).

I have also attached the registry files generated as of today, as a
convenience.
But perhaps you could run this script in your release script or something?
(it's not that critical if they're not up to date to the minute, but they
should be up to date when releases are made)

The script should be executed from the VisualStudio directory, as it writes
output files to the current directory, though that can be changed. It takes
the base directory of the includes as an argument (../include) and an
optional "-p"
or "--print" argument which will cause it to print the directory and file
names as it traverses.

I will soon add generation of the same files for the Express Editions of VC8
and VC9, because they use different registry keys than the paid editions,
but I do not have access to those right now to check.

J-S
--
______________________________________________________
Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca
                        http://whitestar02.webhop.org/



More information about the osg-submissions mailing list