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 sometimes looses chars
 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:41:39 AM  Show Profile  Reply with Quote
1. Select a block of code


   ::NDatabaseSchema::ProcedureParametersCollection::const_iterator
      itProcedureParametersEnd( piProcedure->Parameters().end() ),
      itProcedureParametersBegin( piProcedure->Parameters().begin() ),
      itProcedureParameter( piProcedure->Parameters().begin() );

//Extract From here
      for (; itProcedureParametersEnd != itProcedureParameter; ++itProcedureParameter)
      {
         if ( itProcedureParametersBegin != itProcedureParameter )
         {
            f_os << L"," << std::endl;
         }

         f_os << L"    " << f_traits.FormatVariableIdentifier( ( *itProcedureParameter )->Name() );

         if( ( ::NDatabaseSchema::dir_Out == ( *itProcedureParameter )->Direction() ) ||
             ( ::NDatabaseSchema::dir_InOut == ( *itProcedureParameter )->Direction() ) )
         {
            f_os << L" OUTPUT";
         }
      }
//Extract To Here


2. Refactor->Extract Method:


   :NDatabaseSchema::ProcedureParametersCollection::const_iterator SetParametersForStoredProcedure( :NDatabaseSchema::ProcedureParametersCollection::const_iterator itProcedureParametersEnd, :NDatabaseSchema::ProcedureParametersCollection::const_iterator itProcedureParameter, :NDatabaseSchema::ProcedureParametersCollection::const_iterator itProcedureParametersBegin, std::wostringstream & f_os, :NDBIndependenceLayer::IDBMSTraits const &f_traits )
   {
      for (; itProcedureParametersEnd != itProcedureParameter; ++itProcedureParameter)
      {
         if ( itProcedureParametersBegin != itProcedureParameter )
         {
            f_os << L"," << std::endl;
         }

         f_os << L"    " << f_traits.FormatVariableIdentifier( ( *itProcedureParameter )->Name() );

         if( ( ::NDatabaseSchema::dir_Out == ( *itProcedureParameter )->Direction() ) ||
            ( ::NDatabaseSchema::dir_InOut == ( *itProcedureParameter )->Direction() ) )
         {
            f_os << L" OUTPUT";
         }
      }
      return itProcedureParameter;
   }


3. look at the code generated and its only got one colon at start of variable names instead of two.


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;


n.b. Identical behaviour in 10.4.1640.0

Edited by - mridgwel on Jul 17 2008 11:34:41 AM

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jul 17 2008 :  11:13:47 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=18573

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

support
Whole Tomato Software

5566 Posts

Posted - Dec 01 2008 :  07:40:00 AM  Show Profile  Reply with Quote
case=18573 is fixed in build 1707
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