5

I have writen a method such as:

/// <summary>
/// A method having xml-comments
/// This comment could be very long
/// </summary>
/// <param name="input">Input parameter</param>
/// <returns>Calculated value</returns>
int CommmentedMethod(int input) {
    return Calc(input);
}

But when I use this method, Visual Studio (I'm using VS 2010) just show up "A method having xml-comments This comment could be..." not a full document.

Is there an option to show it?

Updated picture: enter image description here

Thanks :-)

Tu Tran
  • 1,957
  • 1
  • 27
  • 50
  • Are you talking about intellisense, or generating files (like CHM files) based on the XML code comments? – Tim Aug 12 '11 at 05:46
  • 1
    summary should not be very long. If it is, then your method is too complicated(ie. doing more than one thing) – Eranga Aug 12 '11 at 06:17
  • 2
    @Tim: I'm talking about the tip shown in during coding, in Eclipse or Netbeans, it'will show me the full java doc. – Tu Tran Aug 12 '11 at 08:21
  • @Eranga Sometimes I add a short example to it, etc. Or how can I do if I want to see what is returned? – Tu Tran Aug 12 '11 at 08:24
  • @H3S there are other tags to include Examples, Remarks, etc – Eranga Aug 12 '11 at 09:24
  • @Eranga But none of them shown in the popup tip. – Tu Tran Aug 15 '11 at 02:05
  • And neither does the "returns", which is a shame. But you could move some of your summary to the description of the parameters, which do show up (after you type the open parenthesis). – Mr Lister Dec 26 '11 at 10:24
  • @H3S Known bug in Visual studio but solved in SP1 in VS2010. Try installing the service pack. Should work else refer my answer to reduce the font size for the tooltip so that it displays fully. – King Dec 28 '11 at 02:37
  • Sorry mate, Is it mouse hovering over already written function or trying to reference one? I dont understand how you are able to get something like this. Because quickinfo in VS2010 is not of this view. – King Dec 28 '11 at 14:57
  • 1
    The screenshot also looks like parameter info and not quick info. There is something you can do and display umpteen things . That's extending quick info certainly not for this. Looks like there is something wrong ! may be in the way intellisense picks urs. Can you show the tagged structure rather than the comments. Show how you have XML tagged it. I hope we live to see the light of this ! – King Dec 28 '11 at 20:24
  • @Dumb: It's just comments generated from tagged structure because I capture it from metadata! There's no difference – Tu Tran Dec 29 '11 at 03:23

4 Answers4

4

You can use Ctrl + Shift + Space key combination to view the parameter information.

In the following screenshot you can see the overloads, definition and parameter information being shown after clicing Ctrl + Shift + Space with the caret on Format method.

Parameter Information using Ctrl + Shift + Space

rageit
  • 3,513
  • 1
  • 26
  • 38
1

If you use ReSharper you can press CTRL+SHIFT+F1. I don't think Microsoft has this feature.

Andrea
  • 11,801
  • 17
  • 65
  • 72
1

This works in VS2010 as suggested by an answer above. It works in VS2010 showing the entire string fully in tooltip. I suggest you retry in a fresh project again and rebuild the project and see. Intellisense normally uses the text for tooltip that it has used recently. So if you have not completed it on the first time and built it, its not going to show fully. Rebuiding the project should work though. Having said this, I just tried your code and it worked like a dream. So, Please try in a fresh project and see.

Use Quick Info (the tooltip that's shown when you hover your mouse over a method). This will display more than one parameter per line and therefore be able to display more parameters without truncating.

Set a smaller font or font size for tooltips. This can be changed by going to Tools->Options->Environment->Fonts and Colors, choosing "Editor Tooltip" in the dropdown at the top, and setting a different font and/or size.

P.S: However there is one problem if you have done so. Did you migrate from other version of Visual Studio and transfer settings. Because Visual studio has capabilities to import and export settings which you can include intellisense settings also. It may be something I'm not aware of, if you have done so.

Please install SP1 for VS2010 because that's what is solving the problem of truncating quickinfo else reduce font size as I have mentioned ! Hope this helps ! This works by all means and verified !!

King
  • 1,170
  • 2
  • 16
  • 33
0

The tooltip for VS2010 will show the entire contents. I just tested with a new install of VS2010 with no installed addins (Windows 7 pro).

You might try clearing the Automatically adjust visual experience based on client performance flag in the Options... dialog General section and then checking Enable rich client visual experience. The documentation on exactly what this provides is vague, but I suspect this could affect the tooltip display.

competent_tech
  • 44,465
  • 11
  • 90
  • 113