Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1614: Formatting issue with "Move Implementation"

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
MrDoomMaster Posted - Oct 29 2007 : 2:02:59 PM
IDE: Visual Studio 2005

Assume you have the following two files:
foo.h
foo.cpp

Suppose the following class (in foo.h):

class foo
{
private:
    u32 m_one, m_two;

public:
    foo( u32 one, u32 two )
        : m_one( one )
        , m_two( two )
    {
    }
};


Now right click on foo's constructor (above) and click "Move Implementation to source file". Notice the output in foo.cpp:

foo::foo( u32 one, u32 two ) : m_one( one )
, m_two( two )
{

}


There's two issues with the output generated in foo.cpp by the move operation:

1) Notice that the whitespace before each member in the initializer list has been removed.
2) Notice how the first member in the initializer list, m_one, was removed and put on the same line as the constructor header.

Expected Behavior:
-------------------------------
The output should appear as follows. Whitespace, including carriage returns, should all be retained when moving the implementation over to the CPP/IPP file.
foo::foo( u32 one, u32 two )
    : m_one( one )
    , m_two( two )
{

}
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 29 2007 : 5:56:09 PM
I agree about the IDE formatting, I was simply mentioning it as a passing point. Personally I have given up fighting with the IDE over code formatting, at least most of the time.
MrDoomMaster Posted - Oct 29 2007 : 4:15:54 PM
quote:
Originally posted by feline

As an aside, zero indenting of the initializers in the cpp file is the formatting the IDE its self wants to apply.



The IDE will only apply formatting as you type. In other words, it watches for specific key input events (such as RETURN) to know what kind of whitespace to insert for you. Visual Assist, however, should be doing nothing more than inserting text into the edit control (text editor area). If VAX fails to insert whitespace, the IDE should have nothing to do with that as it is the functionality of the extension- not the IDE.
feline Posted - Oct 29 2007 : 4:03:23 PM
I am seeing the same thing here:

case=9594

The missing carriage return can be fixed by changing the formatting of the snippet "Refactor Create Implementation". Change the line:

$SymbolType$ $SymbolContext$( $ParameterList$ ) $MethodQualifier$

to:

$SymbolType$ $SymbolContext$( $ParameterList$ )
$MethodQualifier$

But this does not help with the fact the white space was removed. As an aside, zero indenting of the initializers in the cpp file is the formatting the IDE its self wants to apply.

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