Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Namespace when generating method implementation

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
Hugh Posted - Sep 09 2019 : 1:39:57 PM
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
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Sep 09 2019 : 3:05:45 PM
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.
Hugh Posted - Sep 09 2019 : 3:00:09 PM
Thanks - that's good to know!
accord Posted - Sep 09 2019 : 1:48:01 PM
This is something on our list of things to do:

case=20637

Thank you for the feedback.

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