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
 Feature Requests
 Custom Root-Dir for Auto-Created Includes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Kastenfrosch
Junior Member

10 Posts

Posted - Jul 05 2016 :  03:04:57 AM  Show Profile  Reply with Quote
Our code convention tells us to write includes relative to a common Directory.

As example for root dir "C:/MyProject/Components/":
C:/MyProject/Components/CompA/foo.cpp
C:/MyProject/Components/CompB/dir/bar.cpp

is refered to like:
#include "CompA/foo.cpp"
#include "CompB/dir/bar.cpp"

Would be cool to have an option to support this for the "Refactor->Add Include" Function.

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Jul 05 2016 :  2:02:44 PM  Show Profile  Reply with Quote
I think this is what you would like to do:
http://docs.wholetomato.com/default.asp?W336
Go to Top of Page

Kastenfrosch
Junior Member

10 Posts

Posted - Jul 11 2016 :  07:29:04 AM  Show Profile  Reply with Quote
Hey accord!

Even when i change the
HKEY_CURRENT_USER\SOFTWARE\Whole Tomato\Visual Assist X\VANet14\AddIncludePreferShortestRelativePath value to 0, it still does not always pick the path from the root dir.

I made a minimal example (VS 2015 Update 3, VA_X 10.9.2102.0 built 2016.06.02)
https://www.dropbox.com/s/fnm1ibbjb8ekaji/MinimalIncludeTest2.zip

If i Open "CompA/SrcA.h" and Add Include for missing g_IntA2 (defined in "CompA/ScrA2.h"), i get an
#include "SrcA2.h" instead of "CompA/SrcA2.h"

Or did i misconfigure something?
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Jul 11 2016 :  1:45:50 PM  Show Profile  Reply with Quote
Unfortunately this setting doesn't work when there is no path at all because the header and the source are in the same directory:

case=33851

Edited by - accord on Jul 12 2016 08:23:51 AM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 24 2018 :  2:30:54 PM  Show Profile  Reply with Quote
case=33851 is implemented in build 2291 -- see Add Include path on the Code Generation page of the VA Options dlg.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000