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
 Create From Declaration unavailable for operator==
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

legalize
Tomato Guru

USA
119 Posts

Posted - Aug 03 2014 :  1:29:20 PM  Show Profile  Reply with Quote
namespace date_independent
{

class clock
{
public:
    static clock at(int hour, int minute = 0);

    clock& plus(int minutes);
    clock& minus(int minutes);

    operator std::string() const;

    bool operator==(const clock& rhs) const;

private:
    clock(int hour, int minute);
    int hour_;
    int minute_;
};

}
If I have just added the declaration for operator== and place my cursor on it, Create Implementation is only available ir the cursor is immediately before the keyword "operator", inside the keyword "operator", or immediately after the keyword "operator". If it is in or after the "==", in or before the keyword "bool", or before the space before the keyword "operator" it is unavailable.

http://legalizeadulthood.wordpress.com

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - Aug 07 2014 :  9:11:34 PM  Show Profile  Reply with Quote
Create Implementation is being offered inside == for me, but not on the return type. But since Create Implementation is not being offered on the "clock" return type of your "plus" and "minus" functions, the behaviour on this operator function makes sense.

The refactoring commands are context sensitive, and the return type of a function is not the same context as the function name.

I am testing VS2010 with VA 2043.

zen is the art of being at one with the two'ness
Go to Top of Page

legalize
Tomato Guru

USA
119 Posts

Posted - Aug 07 2014 :  9:21:48 PM  Show Profile  Reply with Quote
I would have expected that if my cursor were anywhere between the beginning of the method declaration and the end that the refactoring would be available. You're saying it is tied to the method name only? It wasn't available when my cursor was in any of the places where an underscore is shown on these lines :
bool operator=_=(
bool operator==_(

http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - Aug 08 2014 :  12:58:05 AM  Show Profile  Reply with Quote
Which IDE and version of VA are you using? As I said, Create Implementation is being offered for me with the caret in both of these locations.

zen is the art of being at one with the two'ness
Go to Top of Page

legalize
Tomato Guru

USA
119 Posts

Posted - Aug 08 2014 :  08:50:39 AM  Show Profile  Reply with Quote
VA_X.dll file version 10.8.2043.0 built 2014.07.10
DevEnv.exe version 12.0.30723.0 Professional
msenv.dll version 12.0.30723.0
Comctl32.dll version 6.10.7601.17514
Windows 7 6.1 Build 7601 Service Pack 1
8 processors (x86-64, WOW64)
Language info: 1252, 0x409

Platform: Win32
Stable Includes:
D:\\Code\\boost\\boost_1_55_0;
C:\\Include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\include;
C:\\Program Files (x86)\\Windows Kits\\8.1\\include;
C:\\Program Files (x86)\\Windows Kits\\8.1\\include;
D:\\Code\\boost\\boost_1_55_0;
C:\\Include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\include;
C:\\Program Files (x86)\\Windows Kits\\8.1\\include;
C:\\Program Files (x86)\\Windows Kits\\8.1\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\include;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\um;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\shared;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\winrt;

Other Includes:

Stable Source Directories:
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\mfc;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\atl;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\crt\\src;

http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19004 Posts

Posted - Aug 08 2014 :  8:11:06 PM  Show Profile  Reply with Quote
I think I have figured out what is going on. Are you trying to trigger Create Implementation via the VAssist IDE menu, or the right click menu? Create Implementation is available in the refactoring context menu, in both of those spots, which is what I was checking with, but it is not in the IDE or right click menu. I have put in a bug report for this:

case=84291

So for now one work around is to either move the caret, or to use the Refactoring Context Menu, which is mapped to Alt-Shift-Q by default.

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