Click to See Complete Forum and Search --> : group project classes in folders; how?


cilu
April 25th, 2005, 07:03 AM
In VC++ 6.0 you can group the classes of a project in folders in the Class View. (I'm not taking about disk folders, but ClassView folders) In VC++.NET you can also create folders, but they are not project's childs, and you cannot put classes in them. Actually, you can but a copy is made, all the classes remain under the project item too. I have hundreds of classes and want to group them in folders in the ClassView so I can expand only those I need at a given time.

Do I do something wrong, or isn't this 6.0 feature supported in .NET?

Thank you.

gstercken
April 25th, 2005, 08:50 AM
In VC++ 6.0 you can group the classes of a project in folders in the Class View. (I'm not taking about disk folders, but ClassView folders) In VC++.NET you can also create folders, but they are not project's childs, and you cannot put classes in them. Actually, you can but a copy is made, all the classes remain under the project item too. I have hundreds of classes and want to group them in folders in the ClassView so I can expand only those I need at a given time.

Do I do something wrong, or isn't this 6.0 feature supported in .NET?I can only speak for the VS 2005 beta (I currently have no 2002/2003 version installed), but according to your description, it seems pretty much the same.

Well, I had also used that feature under VC 6.0, but it was quite buggy - under certain circumstances, the folder hierarchy was lost, and one day I stopped using it, since I got tired of rearranging hundreds of classes...

However, under VS .net, that feature has been changed completely: Instead of moving classes to a folder, a reference will now be created, which is much better IMO. This way, you can keep the classes under the projects in their original structure, and create an additional hierarchy where you can organize the classes as you like.

cilu
April 25th, 2005, 09:18 AM
Well, I had also used that feature under VC 6.0, but it was quite buggy - under certain circumstances, the folder hierarchy was lost, and one day I stopped using it, since I got tired of rearranging hundreds of classes...
Yes, it happened to me too, two or three times. Sometimes the .opt is altered in such a manner that the hierarchy is lost. :sick:

However, under VS .net, that feature has been changed completely: Instead of moving classes to a folder, a reference will now be created, which is much better IMO. This way, you can keep the classes under the projects in their original structure, and create an additional hierarchy where you can organize the classes as you like.
Yes, a reference is a better word than my copy. I know there is no physical copy made.

I find this feature misleading in .NET. At least now I know I didn't do anything wrong, and this is just the way it is.

In FileView you can group the files (sources, headers, etc.) in folders just like in VC6. This hasn't been changed. But here is another thing I don't like: when I open a file, the folder in which it is referenced automatically expands. You can quickly get all the folders expanded, which is not what I had in mind when grouped them like that. :sick:

Thank you.