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
 Extract Method gives no feedback on names
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

legalize
Tomato Guru

USA
119 Posts

Posted - Jun 17 2014 :  10:17:57 AM  Show Profile  Reply with Quote
When I Extract Method on some code, the refactoring dialog gives me no feedback on existing method names to know if I am creating a conflict or not.

It shouldn't let me extract a method/function that shadows an existing signature and it should provide some means for me to see the existing method names on the class where I'm extracting. For functions, it should show me functions from the same enclosing namespace, excluding those from headers marked "stable".

The lack of feedback gives me an opportunity to create invalid code by selecting the defaults.

class Foo
{
    void MyMethod()
    {
        // Extract Method on line below
        std::cout << "MyMethod\\n";
    }
};

yields:

class Foo
{
    void MyMethod()
    {
        // Extract Method on line below
        MyMethod();
    }
    void MyMethod()
    {
        std::cout << "MyMethod\\n";
    }
};

...which is invalid code.

http://legalizeadulthood.wordpress.com

Edited by - legalize on Jun 17 2014 10:20:03 AM

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jun 17 2014 :  2:48:16 PM  Show Profile  Reply with Quote
A very sensible point, I totally agree now someone has pointed this out I have put in a feature request for this:

case=83040

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