Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1442: #include relative browsing bug/suggestion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sasa
Tomato Guru

272 Posts

Posted - Mar 13 2006 :  9:20:15 PM  Show Profile  Reply with Quote
I have one solution with two c++ project in them. My two projects reside under two different folders in the root of the solution folder.

here is what my folder structure looks like:

Solution
 |
 +----mySolution
 |     |
 |     +-------myProject1
 |     |          |
 |     |   prj1.cpp/prj1.h
 |     |          |
 |     |          +----Release
 |     |          +----Debug
 |     |
 |     +-------myProject2
 |                |
 |         prj2.cpp/prj2.h
 |                |
 |                +----Release
 |                +----Debug
 |
 |
 |
 +-----release
 |
 +-----debug

Now, if I am in prj2.h and I do an #include "" I get to see "prj1.h" but if i scroll down and select the file VAX will do an #include "prj1.h" which is wrong and won't compile.

If I do #include "..\\" the VAX appears and show me all the possible folders under my solution, folder I don't care for, and the folder I do care for are somewhat at the bottom of the list.

Two suggestions:

1. If I choose a header file from the #include "" drop down, and that files IS NOT in the current directory (or project), relative path should be appended to the #include. Example of such an include would be #include "..\\myProject2\\prj2.h"

2. If I type a relative path in the #include "" directive, such as #include "..\\" the VAX list of headers/folders should ONLY show files on that relative path, only. so if I go #include "..\\" from prj1.h, I should see "myProject1", and "myProject2" folder only, and if I go into "myProject2" through that VAX list, then I should only see "prj2.h"

Thanks.

C++
Visual Studio 2008 Pro
Windows 7 x64

Edited by - Sasa on Mar 14 2006 01:09:54 AM

jpizzi
Tomato Guru

USA
642 Posts

Posted - Mar 15 2006 :  12:25:07 AM  Show Profile  Reply with Quote
Using VS 2003 and VA X 1246, it behaves as you desire (I do not see prj1.h initially, I have to ..\\ before I can see it).

Maybe something got broke?? I don't know.

Joe Pizzi
Go to Top of Page

Sasa
Tomato Guru

272 Posts

Posted - Mar 15 2006 :  12:34:48 AM  Show Profile  Reply with Quote
Weird, I am using VS2005 and VAX 1442. It doesn't filter the folders/files, as described in my problem above.

C++
Visual Studio 2008 Pro
Windows 7 x64
Go to Top of Page

Sasa
Tomato Guru

272 Posts

Posted - Mar 20 2006 :  7:03:28 PM  Show Profile  Reply with Quote
Sorry for bumping this one. Any updates on this guys?

C++
Visual Studio 2008 Pro
Windows 7 x64
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 20 2006 :  7:34:29 PM  Show Profile  Reply with Quote
We cannot reproduce the problem with 1444. We create a workspace in VC6 with two projects. We type #include in prj1 and see only the header in prj1. We type ..\\ and see the folders we expect.

We get identical behavior from a cpp or header.

What are we missing?


Edited by - support on Mar 20 2006 7:35:06 PM
Go to Top of Page

Sasa
Tomato Guru

272 Posts

Posted - Mar 20 2006 :  8:00:01 PM  Show Profile  Reply with Quote
support, it doesn't work at all like that in my system. I am using VS2005 team edition. I will send you my project and blank out the source code and header files for security purposes.

C++
Visual Studio 2008 Pro
Windows 7 x64
Go to Top of Page

Sasa
Tomato Guru

272 Posts

Posted - Mar 20 2006 :  8:17:19 PM  Show Profile  Reply with Quote
Hi, I uploaded the file on rapidshare.de and sent you the link via the board's emailing system, as well as the password.

I am making use of some new VS2005 features in this solution like the "solution folders". It might be confusing VAX.

Just go in "rfskyTestPAD\\rfskyTestPAD.cpp" and type #include "..\\" it will show you some folders that have nothing to do with the actual hieacrhy of the file system.

Please keep me updated of your findings.

Thanks.

C++
Visual Studio 2008 Pro
Windows 7 x64
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 20 2006 :  9:17:45 PM  Show Profile  Reply with Quote
Thank you for sending a solution to reproduce the problem.

Knowing your IDE and use of "solution folders" certainly helps. (We are forever guessing what IDE and programming language people use.)

Are "Documentation" and "html" the folders you don't expect to see?
Go to Top of Page

Sasa
Tomato Guru

272 Posts

Posted - Mar 20 2006 :  9:51:31 PM  Show Profile  Reply with Quote
support, yes, the "Documentation" and "html" folders shouldn't be there. As well as all the others like "\\interface\\debug\\" "\\interface", etc... and all the rest not under the directory "tree".

Plus, non of the headers files should show, because in that relative path (..), I am at the root of the project, and I have no header files in that root.

Idealy, when I hit "..\\" I should only see "\\debug", "\\Lint", "\\release", "\\rfSKY_API" and "\\rfskyTestPAD" which is where the ".." points too. I mean, that is what one would expect as a behavior.


C++
Visual Studio 2008 Pro
Windows 7 x64
Go to Top of Page

Sasa
Tomato Guru

272 Posts

Posted - Mar 20 2006 :  10:00:46 PM  Show Profile  Reply with Quote
After quickly looking at it, it seems to me that whenever i do an #include "..\\" it somhow goes to the root of the solution no matter in what nested level the file I am working on really is found. And then it list recursivly all the files and folders it can find, starting from the root's solution.

C++
Visual Studio 2008 Pro
Windows 7 x64
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 21 2006 :  4:11:57 PM  Show Profile  Reply with Quote
Okay... after further study, we realize you are expecting more from VA X that what it's doing. VA X doesn't know what your active project is when you type #include. VA X is thinking "solution wide." VA X does this for a number of reasons, one of which is performance. Another is that when you are editing a header, you can type a #include that is independent of any project (the header can be included by any number of projects.)

More... the list of files that appear when you type #include includes, and is relative to, additional include directories and system include directories. When the compiler resolves ../foo.h, it can look in the current directory and in several other places.

As for the file you want being near the bottom, that's because our lists are sorted alphabetically.

You might say VA X is displaying a broad list, just as it does often when presenting lists of symbols during edit.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 21 2006 :  4:14:56 PM  Show Profile  Reply with Quote
Another important point: VA X helps before a project is finished, especially before it's in a buildable state.
Go to Top of Page

Sasa
Tomato Guru

272 Posts

Posted - Mar 21 2006 :  5:48:28 PM  Show Profile  Reply with Quote
But the problem with displaying solution wide headers is not of a very good use, because if I choose one of the files the list is presenting me, my file will not compile at all, unless the .cpp file I am editing happens to be in the same dir as my header.

What would be nice is that if I choose a header that is not in my current directry, then my #include becomes relative to my file including the header, such as "..\\..\\doc\\header.h" and not just "header.h" which will not compile.

But since VAX doesn't know which folder the file I am editing is in, then I guess it won't be possible to do?

C++
Visual Studio 2008 Pro
Windows 7 x64

Edited by - Sasa on Mar 21 2006 5:57:05 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000