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
 Namespace when generating method implementation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Hugh
New Member

9 Posts

Posted - Sep 09 2019 :  1:39:57 PM  Show Profile  Reply with Quote
I've been using Visual Assist (in Visual Studio 2019) for a while now, and am loving what it's giving me.

One thing that does bug me, though, is when I use Create Implementation on a class method.

If I have the following in my header:


namespace MyNamespace
{
class MyClass
{
    MyClass();
};
}


And then in my .cpp:


#include "MyClass.h"

using namespace MyNamespace;


And then I right-click on
MyClass()
in my header, and select "Create Implementation", it creates the following in my .cpp:


MyNamespace::MyClass()
{
}


What would be really useful would be if it could check the .cpp for a "using namespace", and if one exists, for it not to prepend the namespace onto the created implementation. This could maybe be an option, as people may prefer the current workflow.

I believe that this is also the reason why, if I have a number of functions already in my .cpp that don't have the namespace on, if I get it to automatically create a new function that I've declared, it adds it at the bottom, rather than in the appropriate place based on where I've put the declaration in the header. I'm guessing that it's looking for definitions in the header with the namespace on.

Thanks

Edited by - Hugh on Sep 09 2019 1:40:49 PM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 09 2019 :  1:48:01 PM  Show Profile  Reply with Quote
This is something on our list of things to do:

case=20637

Thank you for the feedback.
Go to Top of Page

Hugh
New Member

9 Posts

Posted - Sep 09 2019 :  3:00:09 PM  Show Profile  Reply with Quote
Thanks - that's good to know!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 09 2019 :  3:05:45 PM  Show Profile  Reply with Quote
It seems to be by design and the case is marked as a feature request so it's possible that you're right and it will be optional.
Go to Top of Page

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Jun 18 2020 :  01:35:02 AM  Show Profile  Reply with Quote
case=20637 is fixed in build 2380.
https://support.wholetomato.com/default.asp?W404#2380
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