Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 "Add Include" misbehavior

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Predelnik Posted - Mar 28 2014 : 06:16:50 AM
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.
3   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Apr 01 2014 : 11:25:12 AM
Good point - it only works as expected if Subclass redefines funcFromParent as in the case of an interface. case=81344
Predelnik Posted - Apr 01 2014 : 04:11:14 AM
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.
Dusan Posted - Mar 31 2014 : 1:48:13 PM
Did you read following?

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

Focus on: Caveat in C/C++

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000