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
 small error by "extract method" in VS2012
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vlad.kaplan
New Member

9 Posts

Posted - Sep 11 2013 :  05:43:03 AM  Show Profile  Reply with Quote
Hallo!

First of all, thank you very much for your product, that brings a lot of fun to work with and saves a lot of development time.

Small error: when calling "extract Method" for some code in Method X(), that would normally create new Method Y(). But if Method X() has no extra empty line after the curly braces (the last method in source file), then the Body of newly created method Y() will be inserted directly in Method X(), not outside of it.

Configuration: Visual Studio 2012, Visual Assist X Version 10.7.1940.0 built 2013.05.30

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Sep 14 2013 :  11:26:52 AM  Show Profile  Reply with Quote
Odd, I think I remember this being a problem ages ago, but it was supposed to have been fixed. So far I cannot reproduce this problem.

If you look in the VA Snippet Editor, expand the C++ node, and look at the snippet "Refactor Extract Method" does the code have a single blank line at the start?

Do you have:

IDE tools menu -> Options -> Environment -> Documents -> Check for consistent line endings on load

turned On or Off? If this is turned Off can you please try turning it On, and then closing and reloading the file you are seeing this problem in, and see if you get a warning about inconsistent line endings?

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

vlad.kaplan
New Member

9 Posts

Posted - Sep 17 2013 :  04:36:52 AM  Show Profile  Reply with Quote
quote:
If you look in the VA Snippet Editor, expand the C++ node, and look at the snippet "Refactor Extract Method" does the code have a single blank line at the start?


Yes.

quote:
IDE tools menu -> Options -> Environment -> Documents -> Check for consistent line endings on load

turned On or Off? If this is turned Off can you please try turning it On, and then closing and reloading the file you are seeing this problem in, and see if you get a warning about inconsistent line endings?


It is already on.
Go to Top of Page

vlad.kaplan
New Member

9 Posts

Posted - Sep 17 2013 :  04:52:48 AM  Show Profile  Reply with Quote
And thank you very much for quick response. I got it: when I click "Extract to Source", then this effect does not happen. But, when "Extract to Source" is not set, then some pieces of code are extracted as inline functions and sometimes happens the effect, that newly created function is inserted directly in a body of original function.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Sep 17 2013 :  9:22:23 PM  Show Profile  Reply with Quote
When this happens, are you extracting from a class member function or a free, non member function?

Are you working in the header or cpp file when this happens?

Hopefully once I know what you are doing, I can reproduce the problem on demand here, which always makes fixing it easier.

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

vlad.kaplan
New Member

9 Posts

Posted - Sep 19 2013 :  01:29:24 AM  Show Profile  Reply with Quote
I can send you a small test project, where you could see it happening. Just give me your e-Mail. Would you accept a 7zip Archive?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Sep 19 2013 :  09:46:24 AM  Show Profile  Reply with Quote
Can you 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. This way it goes into our support system, and won't get lost in my email. A 7zip archive is an excellent choice, I have used the 7zip for all of my zip needs for a couple of years now.

Thank you for this, a test project should make this extremely easy to reproduce and study.

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

vlad.kaplan
New Member

9 Posts

Posted - Sep 20 2013 :  01:47:27 AM  Show Profile  Reply with Quote
I've sent it through the contact form. Thank you for your time and effort.
Go to Top of Page

vlad.kaplan
New Member

9 Posts

Posted - Sep 20 2013 :  06:07:47 AM  Show Profile  Reply with Quote
Case number is 76963.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Sep 20 2013 :  9:06:45 PM  Show Profile  Reply with Quote
I have the project, many thanks for this, I am seeing the same problem you are, and I have put in a bug report for this:

case=76985

thankfully the work around for now is very simple, to add a blank line at the end of the file, as you already found.

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

vlad.kaplan
New Member

9 Posts

Posted - Sep 23 2013 :  04:23:42 AM  Show Profile  Reply with Quote
Thank you for your time.
I 've found one more small bug and already sent test project through contact form. Do I need to open a new topic or it is not neccessary in such cases?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Sep 23 2013 :  1:30:05 PM  Show Profile  Reply with Quote
The main reason for starting a new topic is to keep the discussions of the bugs separate. If we have addressed one bug, then bringing up a second bug in the same topic is no problem. The confusion starts when we have several people talking about several different bugs, at the same time, in the same thread

Thank you for the new project, this shows the problem very clearly. This is a surprisingly simple test case, so I am not sure why it is confusing our parser, but clearly it is:

case=77023

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

vlad.kaplan
New Member

9 Posts

Posted - Sep 23 2013 :  3:30:39 PM  Show Profile  Reply with Quote
Thank you one more time.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Sep 23 2013 :  5:53:19 PM  Show Profile  Reply with Quote
I am here to help, and you have produced very clear and easy to follow bug reports, which always makes things easier

Please do let me know if you encounter any further problems, or have any questions about Visual Assist X.

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

vlad.kaplan
New Member

9 Posts

Posted - Sep 25 2013 :  04:42:21 AM  Show Profile  Reply with Quote
Thank you, one more bug was reported (case number # 77086)
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Sep 25 2013 :  5:42:46 PM  Show Profile  Reply with Quote
Thanks vlad, we got your report, and I have replied to you via email. (I was able to repro)

Edited by - accord on Sep 25 2013 5:43:14 PM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 18 2013 :  3:07:37 PM  Show Profile  Reply with Quote
case=76985 and case=77023 are fixed in build 2007
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000