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
 namespaces and refactoring
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

beylevem
Tomato Guru

102 Posts

Posted - Feb 26 2007 :  7:06:32 PM  Show Profile  Reply with Quote
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

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Feb 27 2007 :  12:43:48 PM  Show Profile  Reply with Quote
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

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

beylevem
Tomato Guru

102 Posts

Posted - Feb 27 2007 :  4:28:38 PM  Show Profile  Reply with Quote
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;



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Feb 28 2007 :  09:05:09 AM  Show Profile  Reply with Quote
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

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

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 01 2007 :  2:56:22 PM  Show Profile  Reply with Quote
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.

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

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Mar 01 2007 :  5:29:48 PM  Show Profile  Reply with Quote
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

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

support
Whole Tomato Software

5566 Posts

Posted - Jun 03 2013 :  2:01:29 PM  Show Profile  Reply with Quote
case=5277 and case=5315 are fixed in build 1940
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