VC++ 2005...looking for a plugin.

Started by
4 comments, last by legalize 16 years, 6 months ago
For the work I do it is routine--to the point of extreme annoyance--to import an existing source tree into a project. Notice, I don't want to create a new project from an existing source tree... I want to click on "Add existing item", then click on a folder, and import the entire tree and all source under it into the current project. Bizarrely, VS2005 doesn't have that sort of functionality, so I have to manually "add new filter" for every folder in the tree, and manually add the files from each folder. Sometimes, this can involve HUNDREDS of nested folders and thousands of files. Does anyone know of a plugin that does this?
Advertisement
I don't know of a plugin, but project and solution files are just XML. Maybe write a script to edit them automatically?
Yeah, I thought about that. I may do it.
You can also achieve this with a macro written in VB.NET. You can access the project object model, but unfortunately the documentation is difficult to parse. It may be easier to fiddle the XML, but you can directly manipulate the project from a macro in VS.NET, unlike VC6.

My free book on Direct3D: "The Direct3D Graphics Pipeline"
My blog on programming, vintage computing, music, politics, etc.: Legalize Adulthood!

I've never played with macros before, but I opened "Macro Explorer", and under "Samples" there is a macro folder called "AddDirAsSlnFolder" with an item called "GenerateSlnFolderOnDirStructure", which sounds promising.

I'm not in a position to try that at the moment, but when I do I'll post the outcome. I'm afraid, though, that it's going to dump everything into the root like the project from source does.
Quote:Original post by smitty1276
I've never played with macros before, but I opened "Macro Explorer", and under "Samples" there is a macro folder called "AddDirAsSlnFolder" with an item called "GenerateSlnFolderOnDirStructure", which sounds promising.


Ah, yes, I didn't even think to look in the sample macros. Looking at these it looks like it generates a folder structure in the project/solution that mimics the folder structure on disk.

Also, the macro environment in VS.NET is infinitely better than the facilities provided in VC6. You get a separate IDE window for working on macros so that you can single step and debug macros that are manipulating the main IDE windows. Truly a joy. The only thing that's difficult about it is the funky object model revolving around the projects and solutions for different languages.

My free book on Direct3D: "The Direct3D Graphics Pipeline"
My blog on programming, vintage computing, music, politics, etc.: Legalize Adulthood!

This topic is closed to new replies.

Advertisement