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
 "Move implementation to source" bugged!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MrDoomMaster
Tomato Guru

251 Posts

Posted - Mar 01 2007 :  3:31:52 PM  Show Profile  Reply with Quote
Tested on Build: 1548

Take the following custom auto-text for entry "Refactor Create Implementation" (Note the line numbers ##> define the line number to show carriage returns):


01>
02>//===================================================================================================
03>/**
04>**
05>**/
06>$SymbolType$ $SymbolContext$( $ParameterList$ ) $MethodQualifier$
07>{
08>	$end$$MethodBody$
09>}
10>
11>


When I use "Move implementation to source file" refactoring option, the code is properly moved to the source file in the correct format *except* that the comment part on lines 02 to 05 are not placed above the definition of the function. Instead, tons of carriage returns are put in its place.

Test case:

1) Go to VAX Options >> Advanced >> Suggestions >> Edit Autotext button
2) Inside of the Autotext dialog, go to the entry under C++ >> Refactor Create Implementation
3) Note how the "Description" of this autotext entry states explicitly that this format is also used for "Move implementation to source".
4) Make the Refactor Create Implementation code the exact copy of the snippet I posted above, minus the line numbers.
5) Create a test class in a header file, something like this for example:

class Foo
{
public:
    void SomeFunction()
    {
        int blah = 0;
    }
};

6) Once the header is created, create a corresponding source file with the same name and do an #include "" of the header file you just created in step 5. This source file is where the implementation will be moved to.
7) Shift+Right click the method named "SomeFunction()" above and select Refactor >> Move implementation to source.
8) Watch how the custom text (the comments) you placed above the function format definition earlier in the auto text code window never show up when the implementation is moved to the source file.

What should happen:
When a user selects "Move implementation to source", the custom text above the function specified in the auto text code window should be placed above the implementation header line, instead of just empty lines of whitespace.

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Mar 01 2007 :  7:00:16 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

I would say that "buggered" is a bit strong though. Yes this is a bug, but I have seen worse problems. At least the code is valid

case=5317

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

MrDoomMaster
Tomato Guru

251 Posts

Posted - Mar 01 2007 :  10:30:13 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline


I would say that "buggered" is a bit strong though. Yes this is a bug, but I have seen worse problems. At least the code is valid



I am not quite clear on what you mean. Could you emphasize?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Mar 02 2007 :  07:28:43 AM  Show Profile  Reply with Quote
Compare this with a problem we had a few builds ago with Create Implementation on a template class. In this case a comment in the autotext rule sometimes resulted in VA leaving out the "template<typename T>" line.

In that bug (fixed a few builds ago) the code was invalid, which is a bigger problem than the comment being missing. I am just trying to put bugs into some form of perspective. Some cause major problems, some are just really irritating.

Does this make sense?

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

MrDoomMaster
Tomato Guru

251 Posts

Posted - Mar 02 2007 :  4:30:47 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

Compare this with a problem we had a few builds ago with Create Implementation on a template class. In this case a comment in the autotext rule sometimes resulted in VA leaving out the "template<typename T>" line.

In that bug (fixed a few builds ago) the code was invalid, which is a bigger problem than the comment being missing. I am just trying to put bugs into some form of perspective. Some cause major problems, some are just really irritating.

Does this make sense?



Makes perfect sense, but I don't see any points being made. This seems like only a matter of setting the "priority" value for bugs in your internal bug database.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 17 2007 :  4:07:36 PM  Show Profile  Reply with Quote
Case 5317 is fixed in build 1549.
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