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
 Feature Requests
 Implement Interface Refactor Snippet required
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

andre.horst
Tomato Guru

Germany
150 Posts

Posted - Mar 02 2011 :  08:19:14 AM  Show Profile  Reply with Quote
There is no editable code snippet for the refactor "Implement Interface". The default creates an implementation like

throw std::exception("The method or operation is not implemented.") ;

but i want to change this code.

Btw: The "Implement Interface" Window does not show "<" or ">" of template return values and it is not visible which methods already implemented.

andre.horst
Tomato Guru

Germany
150 Posts

Posted - Mar 02 2011 :  08:22:18 AM  Show Profile  Reply with Quote
There was another point I was wondering about I just forgot to tell. If I inherit "public" the methods are placed in the "private" section. This would be nice if I had inherited "private". I would not call the actual behavior a bug, but a change request.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Mar 02 2011 :  11:32:05 PM  Show Profile  Reply with Quote
Implement Interface uses the VA Snippet "Refactor Create From Usage Method Body", so you can simply edit this snippet.

Which OS are you using? The dialog should show already implemented methods greyed out, but fails to do so under winXP. But you are unable to select them, which is something.

I am seeing the problem with angle brackets and a template return type:

case=55727

Public methods becoming private, it looks like the implemented methods are simply placed at the end of the class, so they end up with what ever visibility this position gives them. So I have put in a feature request to respect the visibility of the original virtual methods:

case=55728

For now you can use VA Outline to re-order the declarations in the class, to give them the required visibility.

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

andre.horst
Tomato Guru

Germany
150 Posts

Posted - Mar 03 2011 :  04:24:46 AM  Show Profile  Reply with Quote
Thanks for the quick reply.

Oh, yes there is the snippet, thank you.

Yes, I use WinXP SP3 and you are right Ii can not select the list-items.

The angle brackets are also wrong in method arguments , but the reason for the problem is probably the same.

I am not sure if the original visibility in the inheritance is the right way to implement it, because I can inherit a whole "public" interface as "protected" for example. Therefor the visibility of the inheritance should be the most important thing.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Mar 03 2011 :  11:28:30 AM  Show Profile  Reply with Quote
I did wonder about visibility with Implement Interface, since there are always going to be cases where you want a different / unexpected visibility. But asking VA to do something that seems reasonable by default seems fair. Then for the cases that are different VA Outline should be able to help.

You make a good point about the visibility of the inheritance, I have put a note onto the case about this, thank you

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

support
Whole Tomato Software

5566 Posts

Posted - Mar 17 2011 :  11:45:22 PM  Show Profile  Reply with Quote
case=55727 is fixed in build 1845

Whole Tomato Software, Inc.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Mar 16 2016 :  12:04:55 AM  Show Profile  Reply with Quote
case=55728 is fixed in build 2093
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