Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leave the non-recognized doxygen commands in comments #5706

Closed
sean-mcmanus opened this issue Jun 26, 2020 · 16 comments · Fixed by #5730
Closed

Leave the non-recognized doxygen commands in comments #5706

sean-mcmanus opened this issue Jun 26, 2020 · 16 comments · Fixed by #5730
Labels
enhancement Improvement to an existing feature Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. fixed Check the Milestone for the release in which the fix is or will be available. insiders Currently only repros with our latest Insiders release. Language Service
Milestone

Comments

@sean-mcmanus
Copy link
Contributor

It is possible to leave the commands that are not being converted? We use \note, \pre, and \post. The current behavior is that they don't show up in the tool tip at all.

Originally posted by @jhortenstine in #658 (comment)

@sean-mcmanus sean-mcmanus added enhancement Improvement to an existing feature insiders Currently only repros with our latest Insiders release. Language Service regression A bug that didn't exist in a previous release Visual Studio Inherited from Visual Studio labels Jun 26, 2020
@sean-mcmanus sean-mcmanus added this to the Tracking milestone Jun 26, 2020
@sean-mcmanus
Copy link
Contributor Author

sean-mcmanus commented Jun 26, 2020

@jhortenstine I think the intent is to avoid showing "too much" info, but it seems like only specifically handled commands should be omitted that are deemed to be "too much", instead of omitting all unrecognized commands by default.

The fact that we don't show \short comments (equivalent to \brief) is an example where were are definitely omitting comments where we should not be (not sure if \note, \pre, and \post fall into that case or not).

I filed a VS issue at https://developercommunity.visualstudio.com/content/problem/1093392/cc-doxygen-comments-are-not-shown-for-commands-tha.html

@jhortenstine
Copy link

I am curious on what "too much" info is (not saying it is wrong design). I thought the previous behavior was just to display the entire comment (at least I could not make it drop text).

Thank you for filing this issue.

@sean-mcmanus
Copy link
Contributor Author

sean-mcmanus commented Jun 26, 2020

Yes, the previous behavior displayed the entire raw comment formatted as text. I'm not sure which commands would count as "too much" info -- that's just what I was told by the VS VC team when I hit the same issue, but I was using @details so I didn't realize the hiding was being applied to all unrecognized commands. Hopefully, they could document what the expected behavior is in regards to which doxygen commands are shown specially, shown as plain text, or not shown.

@michelleangela
Copy link
Contributor

michelleangela commented Jun 29, 2020

Just to clarify, the expected behavior for displaying non-Doxygen comments and Doxygen comments in tooltips are different, so I don't think this is a regression for Doxygen support feature.

Simple text comment (without Doxygen tags/commands) should still display the entire text as there are no text to parse by tags.

Doxygen comments currently display info in the tooltips from the following tags:

  • brief
  • param
  • return
  • exception
  • deprecated

Edit: perhaps this is a feature request to display additional Doxygen tags, like add a settings to specify which tags to display.

@bobbrow
Copy link
Member

bobbrow commented Jun 29, 2020

Does VS Code support collapsible sections in tooltips? If so, we could potentially place the raw comment in there as a stop gap.

@jhortenstine
Copy link

@michelleangela This is not a feature request to display additional Doxygen tags. This is a request to see all the text from the comment.

For example:
/** Initiates a time warp.
@param[in] time Unix time
@pre Must be going at least 88 mph.
*/
The current Doxygen pop-up will not show the @pre line at all. I would prefer if the text was there somehow. I am completely fine with it just copying the text.

@michelleangela michelleangela modified the milestones: Tracking, 0.29.0 Jun 30, 2020
@michelleangela michelleangela removed Visual Studio Inherited from Visual Studio regression A bug that didn't exist in a previous release labels Jun 30, 2020
@michelleangela
Copy link
Contributor

michelleangela commented Jun 30, 2020

@jhortenstine

Thanks for clarifying and providing additional info. We've decided to address this issue by providing settings to allow users to choose between the following options:

  • Display simplified Doxygen comments --> displays comments from a few selected tags.
  • Display complete Doxygen comments --> displays all comments from all tags, and comments at the top without tags is considered as "brief" comments.

These options will be applied to the hover and auto-complete tooltips. It will not be applied to the signature help tooltip, which is specifically designed to only show the comment of the current active parameter (whichever parameter the cursor is on), and is followed by brief comment.

Since this issue is about the presentation layer, it is not an issue against the Doxygen parser that is also used by Visual Studio. So this issue is not dependent on the one filed for Visual Studio at https://developercommunity.visualstudio.com/content/problem/1093392/cc-doxygen-comments-are-not-shown-for-commands-tha.html

@michelleangela michelleangela added the Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. label Jul 2, 2020
@michelleangela michelleangela self-assigned this Jul 6, 2020
@bobbrow bobbrow modified the milestones: 0.29.0, 0.30.0 Jul 7, 2020
@michelleangela michelleangela modified the milestones: 0.30.0, 0.29.0 Jul 7, 2020
@michelleangela michelleangela added the fixed Check the Milestone for the release in which the fix is or will be available. label Jul 7, 2020
@michelleangela
Copy link
Contributor

Re-opening until it is released in 0.29.0

@michelleangela michelleangela reopened this Jul 7, 2020
@sean-mcmanus
Copy link
Contributor Author

sean-mcmanus commented Jul 9, 2020

With https://github.com/microsoft/vscode-cpptools/releases/tag/0.29.0-insiders2 you can set the C_Cpp.simplifyStructuredComments setting to false to show all comments. Let us know if you have any additional feedback on that, in particular, the styling changes.

@jhortenstine
Copy link

jhortenstine commented Jul 9, 2020

The only thing I saw missing was the param's "in", "out", or "in, out".
The styling was nice. It allows me to find the parameters quickly and helped distinguish between the commands.

Edit: The in/out is much less important than the fix you have. Thank you for providing a fix.

@BillDenton
Copy link

@sean-mcmanus The option shows as "C_Cpp.simplifyStructuredComments" not "C_Cpp.simplyStructuredComments"
It is a bit intermittent as to when it works or not. I think that may be more general problems with the C/C++ extension as it still (nearly always) consumes a core all the time. Also, I don't have compile json database (waiting for scons to generate it and getting our scons upgraded).
Like the format, but would have liked to see the "out" and "in,out". We are omitting the "in" for input only parameters.
I notice if there isn't a description for the parameter then the parameter isn't shown:
/**

  • Brief description which is shown.
  • @param ParamOne Parameter one which is shown.
  • @param ParamTwo
    */
    The "brief description" is shown. "ParamOne" shows. "ParamTwo" not shown. If none of the parameters has descriptions then nothing shows. I think all our functions have @param (because we check Doxygen during submission), but don't all have descriptions.

@bobbrow
Copy link
Member

bobbrow commented Jul 13, 2020

The option shows as "C_Cpp.simplifyStructuredComments" not "C_Cpp.simplyStructuredComments"

I corrected the typo.

@michelleangela
Copy link
Contributor

michelleangela commented Jul 13, 2020

Created a feature request on Visual Studio to support '['dir']' of command Doxygen \param so that [in] or [out] are also parsed.
https://developercommunity.visualstudio.com/content/problem/1111522/support-dir-optional-attribute-of-doxygen-param.html.

GitHub issue that's tracking request:
#5773

@michelleangela
Copy link
Contributor

michelleangela commented Jul 13, 2020

The fix for this is in progress and will be included in release of 0.29.0.

I notice if there isn't a description for the parameter then the parameter isn't shown:
/**

  • Brief description which is shown.
  • @param ParamOne Parameter one which is shown.
  • @param ParamTwo
    */
    The "brief description" is shown. "ParamOne" shows. "ParamTwo" not shown. If none of the parameters has descriptions then nothing shows. I think all our functions have @param (because we check Doxygen during submission), but don't all have descriptions.

@sean-mcmanus
Copy link
Contributor Author

sean-mcmanus commented Jul 16, 2020

Can this issue be closed (with 0.29.0) or were there additional feedback to follow up on and open new issues for?

@michelleangela
Copy link
Contributor

This can be closed. I created new issues of the other issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. fixed Check the Milestone for the release in which the fix is or will be available. insiders Currently only repros with our latest Insiders release. Language Service
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants