Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 namespaces and refactoring

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
beylevem Posted - Feb 26 2007 : 7:06:32 PM
Hi:

If I code the following:

namespace N2 {
class C3 {
C3();
};
}

using namespace N2;

void C3::Func1() {}

I cannot use the refactoring menu to create a declaration. If I fully qualify the function N2::C3::Func1() for the implementation, I get the correct menu options. I can see that there is the possibility of ambiguity if the same class appears in different namespaces, but for the simple case where only one class of the given name exists, is it possible to make it work?

Thanks,
Mark
6   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jun 03 2013 : 2:01:29 PM
case=5277 and case=5315 are fixed in build 1940
feline Posted - Mar 01 2007 : 5:29:48 PM
Found the problem in my tests. Since I wanted to make sure there were no syntax errors in my code I added a declaration for the function, so the code would compile. Having done this you can use VA to add a second declaration. Remove the declaration, and VA will not offer any refactorings (except Extract Method) if you are "using namespace XXX"

Of course I was doing this since if the code does not compile at all, it is a little unfair to complain that it confuses VA.

case=5315
feline Posted - Mar 01 2007 : 2:56:22 PM
I have the test project, thank you. I am seeing the same behaviour as you, now all I need to do is figure out why.
feline Posted - Feb 28 2007 : 09:05:09 AM
Please submit the zip file via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.

Obviously you are doing something different to me, since in my tests this worked correctly. This way I can try and work out why it works for me but fails for you. I did use longer names, to avoid any conflicts, I have been caught that way before
beylevem Posted - Feb 27 2007 : 4:28:38 PM
I am using build 1548 to test this. I can send you a zip of the test project I created if that would help

VA_X.dll file version 10.3.1548.0 built 2007.02.23
Licensed to:
VAOpsWin.dll version 1.3.4.6
VATE.dll version 1.0.6.0
MSDev.exe version 6.0.9782.1
Devshl.dll version 6.0.9782.0
Devedit.pkg version 6.0.9782.0
Font: Bitstream Vera Sans Mono 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
2 processors

Platform: Win32 (x86)
Stable Includes:
C:\\dnb\\vs\\DF98\\CXML\\Include;
C:\\dnb\\vs\\DF98\\IMSL\\Include;
C:\\dnb\\vs\\VC98\\Include;
C:\\dnb\\vs\\DF98\\Include;
c:\\dnb\\vs;
C:\\dnb\\vs\\VC98\\mfc\\Include;
C:\\dnb\\vs\\VC98\\atl\\Include;

Library Includes:
C:\\dnb\\vs\\VC98\\MFC\\SRC;
C:\\dnb\\vs\\VC98\\MFC\\INCLUDE;
C:\\dnb\\vs\\VC98\\ATL\\INCLUDE;
C:\\dnb\\vs\\VC98\\CRT\\SRC;



feline Posted - Feb 27 2007 : 12:43:48 PM
Can you please try upgrading to VA 1548:

details here:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5946

direct download link:
http://www.wholetomato.com/downloads/VA_X_Setup1548.exe

I have just tried this and Create Declaration is working for me. It turns out there is a small bug, the class name is not removed from the new declaration, but the declaration definitely appears in the right place.

case=5277

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