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
 Adding #include for selected class/type
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

drzoom
Ketchup Master

Switzerland
57 Posts

Posted - Nov 07 2006 :  02:27:25 AM  Show Profile  Reply with Quote

Preface: (C++) I'm still working trough old code and solving a lot of #include problems...

Topic: A feature would be nice, to add the correct #include for a given class or type.

Your objections:
  • It's not easy to find the right #include file, because many libraries are using "proxy" includes forwarding to the correct one.
  • How should we decide between a #include <foo.h> and a #include "foo.h" statement.
  • Unfortunately we are an add-in, and have to sneak around behind the IDE's back, so things that are easy when you control the IDE, ... ;-)

Some solutions:
  • The file, where a class is declared is the primary choice.
  • If this file is inside the project, a relative #include "../foo.h" is the best choice
  • If the file is external, but in the regular search path, a #include <foo.h> or #include <bar/foo.h> ist the best choice.
  • If the file is neither in the project, nor in the searchpath, but another file is including the target and the filename is matching the typename, this is the right choice (e.g for Qt/boost)
  • In other cases, no #include is added - or a list of possible alternatives is shown.


best regards
Tobias

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Nov 07 2006 :  08:04:26 AM  Show Profile  Reply with Quote
This is already in the list You do make some interesting suggestions for how to do this, which I have added to the case.

case=226

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 27 2009 :  10:38:10 PM  Show Profile  Reply with Quote
case=226 is implemented in build 1715
Hover over an unrecognized symbol and choose "Add include xxxx" from the refactoring context menu.


Whole Tomato Software, Inc.
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