Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Disable automaticaly added not required namespace

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
Jorgos Posted - Dec 21 2016 : 06:47:28 AM
Hello,
I'm developing in Cpp, and i have following issue. Let say i have following code (It is only a snippet so I don't expect it to compile :) ):

file.h
namespace A{
class B{
B();
}
}
and in file.cpp i have "using namespace A" clause. Now i want to use Create Implementation option. There will be created following method:

file.cpp
using namespace A;
A::B::B()
{}

Adding namespace A:: in this case is not required, and makes code less readable, especially when namespace name is not very short. Is there any option to disable this unnecessary namespace?


9   L A T E S T    R E P L I E S    (Newest First)
Jorgos Posted - Jun 18 2020 : 03:36:36 AM
quote:
Originally posted by ChrisG

case=20637 is fixed in build 2380.
https://support.wholetomato.com/default.asp?W404#2380



Thank you as well for the fix :)
pjwhams Posted - Jun 18 2020 : 03:26:45 AM
quote:
Originally posted by ChrisG

case=20637 is fixed in build 2380.
https://support.wholetomato.com/default.asp?W404#2380



Excellent, thank you!
ChrisG Posted - Jun 18 2020 : 01:35:16 AM
case=20637 is fixed in build 2380.
https://support.wholetomato.com/default.asp?W404#2380
pjwhams Posted - May 19 2017 : 07:16:41 AM
If I didn't have VisualAssist and VsVim then my productivity would plummet!
feline Posted - May 19 2017 : 06:42:29 AM
That also works Personally I was never able to think both Vim and IDE at the same time, but I do sometimes miss the power and control of Vim.
pjwhams Posted - May 18 2017 : 6:30:59 PM
Thanks for the fast response. Fortunately I use VsVim and judicious use of '4dw' is enough to quickly remove the extraneous namespace.
feline Posted - May 18 2017 : 5:53:41 PM
Sorry about this, it is still on our list of things to fix. If you are having a lot of problems like this, you might find it easier to start typing out the class name and member name for the implementation manually. VA should help you insert the correct class name and member name quickly and easily. Also, if the function takes parameters, VA will give you a tooltip offering to insert these when you are typing the implementation.

Not the same, but hopefully something that will help a bit.
pjwhams Posted - May 18 2017 : 4:43:39 PM
I also have this problem on a daily basis. The problem gets worse when you have something that uses several types from the same namespace. Every time I do 'create implementation' I have to do lots of manual deletion:


// file.h
namespace Company {
namespace Product {
struct ValueType {};

template <T>
class TClass {};

class MyClass
{
public:
	TClass<ValueType>  getValue(); // nice and short...
};
}} // end namespace


// file.cpp - create implementation
namespace Company {
namespace Product {
// woah.
Company::Product::TClass<Company::Product::ValueType> MyClass::getValue()
{

}

}}
ChrisG Posted - Dec 22 2016 : 07:18:19 AM
Hello Jorgos,

Thank you for your feedback. It looks like we have already started tracking this issue. I have added your voice to the case, 20637.

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