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
 Technical Support
 Superfluous namespace detail with using namespace
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

blloyd
Starting Member

USA
1 Posts

Posted - Oct 02 2014 :  5:51:00 PM  Show Profile  Reply with Quote
Suppose I have a header file bar.h:


namespace foo 
{

class bar
{
  public:
  bar();
  void someNewMethod();
};

} // namespace foo


And an implementation file bar.cpp:


#include "bar.h"
using namespace foo;

bar::bar() {}


When I select "Create Implementation" for bar::someNewMethod() the following lines are added to bar.cpp:


void foo::bar::someNewMethod()
{

}


But the "foo::" detail on "foo::bar::someNewMethod()" is unnecessary. One aggravating side effect of this is that when I list the methods in the file, all the foo::bar:: methods get segregated from the bar:: methods.

And it isn't just "Create implementation" that does this. If use "Change signature" on a bar:: method it gets transformed into a foo::bar:: method. If I do "Extract method" I get a foo::bar:: method. The expected result is that the "foo::" gets left oft because of the "using namespace foo" statement at the top of the file.

feline
Whole Tomato Software

United Kingdom
18727 Posts

Posted - Oct 05 2014 :  12:30:40 PM  Show Profile  Reply with Quote
Thank you for the very clear problem description, I am seeing the same thing here, in all of the cases you are describing:

case=85429

That should not be happening, apologies for this. As a temporary work around, for the Alt-M list, can you try opening the Alt-M list, and then right clicking into the list its self, not the context field at the top of the list, and turning Off "Include Scope", this should help, since it will remove both the class name and namespace from the entries in the alt-m list.

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

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Jun 18 2020 :  01:35:31 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