Author |
Topic |
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Mar 02 2011 : 08:19:14 AM
|
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
|
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. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Mar 02 2011 : 11:32:05 PM
|
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 |
|
|
andre.horst
Tomato Guru
Germany
150 Posts |
Posted - Mar 03 2011 : 04:24:46 AM
|
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. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Mar 03 2011 : 11:28:30 AM
|
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 |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Mar 17 2011 : 11:45:22 PM
|
case=55727 is fixed in build 1845 |
Whole Tomato Software, Inc. |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Mar 16 2016 : 12:04:55 AM
|
case=55728 is fixed in build 2093 |
|
|
|
Topic |
|