Author |
Topic |
|
KoenTanghe
Senior Member
Belgium
28 Posts |
Posted - Apr 30 2018 : 05:05:42 AM
|
Hi,
long-time satisfied VA user here.
I used to just type /** right in front of a method to have VA auto-generate the Doxygen style docs for that methods, but when I now do that, it just completes a comment block after I have typed to first 2 characters /*, so I get /**/ and that's it.
I have this setup as a Document method template in the snippets:
/** $end$
* @param $MethodArgName$
* @return
*/
Any idea what could be the cause of this?
Required info:
VA_X.dll file version 10.9.2258.5 built 2018.03.06
DevEnv.exe version 14.0.25420.1 Community
msenv.dll version 14.0.25431.1
Comctl32.dll version 6.10.16299.371
Windows 10 10.0 Build 16299
4 processors (x86-64, WOW64)
Language info: 1252, 0x409
Thanks, Koen
|
Edited by - KoenTanghe on Apr 30 2018 05:14:33 AM |
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Apr 30 2018 : 07:16:18 AM
|
The shortcut /** should still work, but this won't expand Document Method tags in the snippet body. If you trigger a standard snippet, then you just get a standard snippet. You can certainly set this to insert a Doxygen format comment block, but it won't be updated to reflect the details of the function on the next line.
To trigger the Document Method snippet you need to trigger the Document Method refactoring command on the function name, so that VA has the required context and knows how to expand these tags. When you do this the Document Method snippet in the Refactoring list of snippets is used and expanded, and the comment is inserted above the current function.
I hope this makes sense, but it does not explain why /** is no longer working as a shortcut. |
zen is the art of being at one with the two'ness |
|
|
KoenTanghe
Senior Member
Belgium
28 Posts |
Posted - Apr 30 2018 : 4:03:52 PM
|
Thanks for the reply.
I got the /** working as a shortcut, but indeed, no automatic expansion of the parameters of the method. I was under the impression that VA could do that (without having to right-click on the method and selecting the "Document Method" menu item explicitly). But I must have been dreaming then...
Strange that in C#, when typing /// we do get the parameters expanded, but I guess that's because Visual Studio has more power to analyze the context then?
Is it really not possible for VA to look at the next line(s) when a shortcut is triggered by typing, and if a method is found, allow the snippet for that shortcut to use the Document Method tags? That is what we need, I would say. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - May 01 2018 : 09:48:24 AM
|
The /// shortcut is triggering an IDE command in C#. In theory, yes, VA can look for the next line, to get the function declaration. The problem is, what happens when the next line is not a function declaration? C++ syntax can be rather more complex than C# syntax, especially when macros get involved.
We are looking at allowing refactoring tags in snippets outside of the refactoring commands, the problem is resolving them correctly, and deciding on the rules of behaviour. If there is a blank line between the comment and the function, is the function still the scope?
What if there is an existing comment block?
I am not trying to be difficult, just trying to explain that it isn't always as easy to get these things working reliably. The current Document Method is a little restrictive, but it is well defined and reliable. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|
|
|