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.