Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Refactor->Extract method sometimes looses chars

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
mridgwel Posted - Jul 17 2008 : 07:41:39 AM
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
2   L A T E S T    R E P L I E S    (Newest First)
support Posted - Dec 01 2008 : 07:40:00 AM
case=18573 is fixed in build 1707
feline Posted - Jul 17 2008 : 11:13:47 AM
I am seeing the same effect here. Thank you for the clear description.

case=18573

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