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.