Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Create & Move Refactoring error

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
blq Posted - Oct 11 2006 : 05:36:28 AM
Having C-style comments *with commas inside* in a method argument list causes Create&Move refactoring to format incorrectly.

Example: int dummy(/*bla, bla*/);

Refactoring "Create Implementation" and "Move Implementation to Source File" => int dummy(/*bla*/, bla*/)

// Fredrik



9   L A T E S T    R E P L I E S    (Newest First)
support Posted - Apr 14 2007 : 12:02:42 AM
Case=2970 is fixed in Build 1553.
feline Posted - Dec 15 2006 : 10:30:00 AM
that makes sense, I have put a note on the case about this. thank you.
bugfix Posted - Dec 15 2006 : 10:17:32 AM
its some of those COM odds. id say remove it, as the new extracted function does not implement a COM interface function. like extracting a method from a virtual function.
feline Posted - Dec 15 2006 : 10:07:01 AM
static not being removed from the parameter is a known problem

case=4037

When I extract the for loop I get a mismatched bracket on the function:

STDMETHOD( MyMethod( static const IID* arr, REFIID riid )

case=4125

the function is also wrapped in "STDMETHOD", does this seem sensible? I don't claim to understand why STDMETHOD is used, so I don't know if this is sensible or not.

There is also a problem where the new function is called, its value is returned directly. however, thinking about this, I am not sure there is anything VA can do about this, other than possibly display a warning suggesting you are doing something unwise.

case=4126
bugfix Posted - Dec 15 2006 : 03:20:11 AM

class bla
{
    STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid)
    {
        static const IID* arr[] = 
        {
            &GUID_NULL,
        };

        for (int i=0; i<sizeof(arr)/sizeof(arr[0]); i++)
        {
            if (InlineIsEqualGUID(*arr[i], riid))
                return S_OK;
        }
        return S_FALSE;
    }
};


now select the for loop and do extract method.

i found this thread after searching for STDMETHOD which pointed me first to TOPIC_ID=5440 and then i ll ended up here:)
looking closely there seems to be another bug... the new methods first param uses 'static' as qualifier.
feline Posted - Dec 14 2006 : 5:57:54 PM
how are you triggering this problem with Extract Method? Using the function:

static void testingExtract()
{
    int nFoo = 0;
    nFoo = 3; /* there is a comma, in this comment */
}


and extracting the line with the comment I am not seeing any problems.
bugfix Posted - Dec 14 2006 : 12:25:45 PM
just wanted to add that 'Extract Method' is also affected
feline Posted - Oct 11 2006 : 1:08:43 PM
confirmed

case=2970
blq Posted - Oct 11 2006 : 05:40:44 AM
I've been using 1535 & 1538 btw.

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