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
 Issue with Refactoring Extract Method
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nabulke
Starting Member

1 Posts

Posted - Sep 21 2009 :  07:36:45 AM  Show Profile  Reply with Quote
Hello,

edit:
this problem is probably related to:
http://www.visualassist.com/forum/topic.asp?whichpage=1&TOPIC_ID=8686#34666
if yes, I apologize for the double post.


I have the following problem using the extract method refactoring with the 'extract to source' option checked:

if there is no newline after the last closing bracket in the C++ cpp file, the function declaration will be inserted INSIDE the last function of that cpp. To clarify things I attach an example showing the file before and after the refactoring. This happens not with all cpp files, but with most (those that use namespaces in .hpp, not sure yet). The resulting source code is not compilable.


Before refactoring:
[....]
BOOL CBild::IstFehlerortSuchergebnis(const CString& strFehlerortDBID) const
{
return m_pMapFESGefunden->Lookup(strFehlerortDBID, strValue);
}<End of file here>

After refactoring:
[....]
BOOL CBild::IstFehlerortSuchergebnis(const CString& strFehlerortDBID) const
{
return m_pMapFESGefunden->Lookup(strFehlerortDBID, strValue);

// INSERTS DECLARATION HERE, INSIDE LAST METHOD!
BOOL MyMethod( const CString& strFehlerortDBID );
}

// DEFINITION AT END OF FILE
BOOL CBild::MyMethod( const CString& strFehlerortDBID )
{
...
return TRUE;
}<End of file here>


Thanks in advance for any help

Horst


my setup:
- Visual Assist X 10.5.1727.0
- Visual Studio 2008 English
- Language C++

Edited by - nabulke on Sep 21 2009 10:02:25 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 21 2009 :  4:41:42 PM  Show Profile  Reply with Quote
I believe this is

case=20072

I suggest to wait for the fix, and then check it again.
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