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
 "Add Include" misbehavior
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Predelnik
Senior Member

Russia
37 Posts

Posted - Mar 28 2014 :  06:16:50 AM  Show Profile  Reply with Quote
Let's just say that I have class "Subclass" which is subclass of class "Parent" and they are defined in 'subclass.h' and 'parent.h' files respectively. funcFromParent - name of the function declared in class "Parent".

Then I'm writing something like:

void f (Subclass &x)
{
   x.funcFromParent ();
}

Then in refactor context menu while clicking on `funcFromParent ()` VAX proposes me to include 'parent.h' file which may seem correct on the first glance but in reality since it doesn't know anything about what Subclass is and how to convert it to Parent it's definitely not wanted behavior.

Also I think that VAX should propose include Subclass while pressing on x itself and not on functions called, because it seems more logical to me though maybe it's just a design decision. The first thing I described on the other hand is actually an issue.

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Mar 31 2014 :  1:48:13 PM  Show Profile  Reply with Quote
Did you read following?

http://docs.wholetomato.com/default.asp?W177

Focus on: Caveat in C/C++
Go to Top of Page

Predelnik
Senior Member

Russia
37 Posts

Posted - Apr 01 2014 :  04:11:14 AM  Show Profile  Reply with Quote
Well that's sad. Actually if VAssist could manage to distinguish between fully declared and forward declared symbols it could propose to include headers for forward declared ones (in addition to undeclared) in case if IDE shows that there is error in that line. I cannot be sure that it's easy/possible though. Well thank you very much for the link anyway.

Edited by - Predelnik on Apr 02 2014 10:19:25 AM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Apr 01 2014 :  11:25:12 AM  Show Profile  Reply with Quote
Good point - it only works as expected if Subclass redefines funcFromParent as in the case of an interface. case=81344
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