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
 "Add Forward Declaration" refactoring
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kennyl
Ketchup Master

50 Posts

Posted - Oct 10 2012 :  01:24:38 AM  Show Profile  Reply with Quote
As we all know that forward declaration is better than adding inclusion whenever it's possible, so I suggest this feature to be implemented in VA.

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 10 2012 :  9:59:08 PM  Show Profile  Reply with Quote
We are considering adding a refactoring command to do this at some point:

case=27045

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

Matthew Jack
Starting Member

United Kingdom
1 Posts

Posted - May 02 2013 :  05:36:48 AM  Show Profile  Reply with Quote
I'm really missing this. Adding an include is handy, but encourages bad practice.
Being a fan of fast compile times, I usually pass on this feature and add a forward declaration myself.
You mention a case number, but I don't see how to look that up?
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 02 2013 :  05:58:52 AM  Show Profile  Reply with Quote
You can ask us about the status of a case:
http://docs.wholetomato.com?W318

case=27045 is still on our list of things to do, not yet implemented. Seeing interest about a feature can help us prioritizing.
Go to Top of Page

chrisaverage
Junior Member

Poland
20 Posts

Posted - Feb 17 2014 :  09:58:53 AM  Show Profile  Reply with Quote
I have a lot of container-like classes with lots of pointers.
I use forward declaration for them very often and this feature would be a huge time saver.
I would even go as far as "Add forward declaration for all unknown symbols" but that might be a little over the top.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Feb 18 2014 :  4:08:32 PM  Show Profile  Reply with Quote
An option to add all forward declarations is an interesting idea, I have put a note onto the case about this, to see what our developers make of it.

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

chrisaverage
Junior Member

Poland
20 Posts

Posted - Feb 23 2014 :  04:39:37 AM  Show Profile  Reply with Quote
Either for all or single forward declaration it would be nice if it also added the full include in the corresponding .cpp file if there is one.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Feb 26 2014 :  7:35:40 PM  Show Profile  Reply with Quote
A very interesting idea, this makes sense, I have put a note onto the case about this:

case=27045

An alternative approach is that we are considering a change to allow Add Include to run several times in a row, to add all required include lines to the cpp file:

case=27923

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