Author Topic: workspace tagging  (Read 4974 times)

hutnut

  • Community Member
  • Posts: 9
  • Hero Points: 0
workspace tagging
« on: August 02, 2006, 02:05:11 pm »
It appears that when opening a Visual Studio solution that contains multiple projects, tagging support is limited to the confines of the files within a specific project. For example, if the solution is organized as follows:

Master Project
  Project 1
    Test1.cpp
  Project 2
    Test2.cpp
  Project 3
    Test3.cpp
    Project 3 Sub Project 1
       Test3Sub1.cpp

and Test2.cpp references definitions contained within Project 1, they can not be found. Creating a new project that includes all of these files will work, but, it flattens out the hierarcy and loses the convenience of working with each project individually. Can tagging somehow cross projects when opening Visual Studio solutions?

Phil Barila

  • Senior Community Member
  • Posts: 746
  • Hero Points: 61
Re: workspace tagging
« Reply #1 on: August 02, 2006, 05:33:57 pm »
Visual Studio doesn't always get that right, either.  If the header file that defines something hasn't been opened yet, sometimes Studio can't find that def.  The solution is to add your headers to your vcproj file, then the defs will always be found.

hutnut

  • Community Member
  • Posts: 9
  • Hero Points: 0
Re: workspace tagging
« Reply #2 on: August 02, 2006, 07:10:25 pm »
I should be clearer. If the example looks like:

Master Project
  Project 1.vcproj
    Test1.cpp
    Test1.h
  Project 2.vcproj
    Test2.cpp
    Test2.h
  Project 3.vcproj
    Test3.cpp
    Test3.h
    Project 3 Sub Project 1.vcproj
       Test3Sub1.cpp
       Test3Sub1.h

then the files contained within each .vcproj are being treated as self contained, i.e. Test2.cpp has no knowledge of Test1.h. Say for example that Project 1 builds a .lib and Project 2 consumes it. Selection of a function in Project 2 contained within the .lib from Project 1 will yield no definition results. This makes good sense for project organization and building, although, less than desirable for tagging. In this example, each of these projects are dependent on one another to construct the master application. It would help tremendously if tagging crossed projects and was based on the master solution. The above example presented a simple example to illustrate the problem. The solution may be very complex, e.g. 20 projects, hundreds of headers, etc.

Phil Barila

  • Senior Community Member
  • Posts: 746
  • Hero Points: 61
Re: workspace tagging
« Reply #3 on: August 02, 2006, 07:50:55 pm »
Is your "Master Project" a Visual Studio .sln file, or a vpw to which you have added the vcproj files?  I use SlickEdit exactly this way almost exclusively, and have never had a problem, though my "Master Project" is a working Visual Studio sln.

jbezem

  • Community Member
  • Posts: 80
  • Hero Points: 8
Re: workspace tagging
« Reply #4 on: August 03, 2006, 09:00:30 am »
I usually add the interface headers of project-boundary-crossing modules in a separate tag file, which is active by default. That way I'll find those definitions and declarations no matter which workspace is currently open, and which project is active.

HTH,

Johan