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
 Refactor->Extract Method does a format on code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mridgwel
New Member

United Kingdom
8 Posts

Posted - Jul 17 2008 :  07:27:51 AM  Show Profile  Reply with Quote
1. Ensure that 'Format after paste' is disabled
2. Select a block of code from a method:


            if ( rpiColumn )
            {
               if ( !rpiColumn->IsPrimaryKeyMember() && !rpiColumn->IsModelIdentifier() && !rpiColumn->IsReadOnly() )
               {
               std::wstring
                  sParameterName( rpiColumn->Name() );

                  ::NDatabaseSchema::TranslateItemIdPrimaryKeyName(
                     f_rSchemaManager,
                     f_rpiTable,
                     sParameterName );

                  f_raParameters.push_back( new CUpdateColumnProcedureParameter( sParameterName.c_str() ) );
               }
            }


3. ExtractMethod:


         void AddColumnAsParameter( TAddReffedPtr< ::NDatabaseSchema::IColumn > const rpiColumn, :NDatabaseSchema::ISchemaManager const & f_rSchemaManager, TAddReffedPtr< ::NDatabaseSchema::ITable > const & f_rpiTable, :NDatabaseSchema::ProcedureParametersCollection &f_raParameters )
         {
            if ( rpiColumn )
            {
               if ( !rpiColumn->IsPrimaryKeyMember() && !rpiColumn->IsModelIdentifier() && !rpiColumn->IsReadOnly() )
               {
                  std::wstring
                     sParameterName( rpiColumn->Name() );

                  ::NDatabaseSchema::TranslateItemIdPrimaryKeyName(
                     f_rSchemaManager,
                     f_rpiTable,
                     sParameterName );

                  f_raParameters.push_back( new CUpdateColumnProcedureParameter( sParameterName.c_str() ) );
               }
            }
         }


should have kept the formatting as before:


void AddColumnAsParameter( TAddReffedPtr< ::NDatabaseSchema::IColumn > const rpiColumn, :NDatabaseSchema::ISchemaManager const & f_rSchemaManager, TAddReffedPtr< ::NDatabaseSchema::ITable > const & f_rpiTable, :NDatabaseSchema::ProcedureParametersCollection &f_raParameters )
         {
            if ( rpiColumn )
            {
               if ( !rpiColumn->IsPrimaryKeyMember() && !rpiColumn->IsModelIdentifier() && !rpiColumn->IsReadOnly() )
               {
               std::wstring
                  sParameterName( rpiColumn->Name() );

                  ::NDatabaseSchema::TranslateItemIdPrimaryKeyName(
                        f_rSchemaManager,
                        f_rpiTable,
                        sParameterName );

                  f_raParameters.push_back( new CUpdateColumnProcedureParameter( sParameterName.c_str() ) );
               }
            }
         }



VA Info

VA_X.dll file version 10.4.1645.0 built 2008.07.10
Licensed to:
VA X: [email protected] (2-user license) Support ends 2009.06.02
DevEnv.exe version 9.0.21022.8
msenv.dll version 9.0.21022.8
Font: Courier New 13(Pixels)
Comctl32.dll version 6.0.3790.2825
Windows Server 2003 5.2 Build 3790 Service Pack 2, v.4045
4 processors

Platform: Win32
Stable Includes:
D:\\Dev\\VisualStudio9\\VC\\include;
D:\\Dev\\VisualStudio9\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;

Other Includes:

Stable Source Directories:
D:\\Dev\\VisualStudio9\\VC\\atlmfc\\src\\mfc;
D:\\Dev\\VisualStudio9\\VC\\atlmfc\\src\\mfcm;
D:\\Dev\\VisualStudio9\\VC\\atlmfc\\src\\atl;
D:\\Dev\\VisualStudio9\\VC\\crt\\src;


Edited by - mridgwel on Jul 17 2008 07:47:23 AM

mridgwel
New Member

United Kingdom
8 Posts

Posted - Jul 17 2008 :  07:29:34 AM  Show Profile  Reply with Quote
n.b. I should mention that this had identical behaviuour in VA 10.4.1640.0
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jul 17 2008 :  10:42:56 AM  Show Profile  Reply with Quote
Currently this is by design, but we are looking to use a different system for setting the indent of code after Extract Method:

case=4112

zen is the art of being at one with the two'ness
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