Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Extract Method gives no feedback on names

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
legalize Posted - Jun 17 2014 : 10:17:57 AM
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.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 17 2014 : 2:48:16 PM
A very sensible point, I totally agree now someone has pointed this out I have put in a feature request for this:

case=83040

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