# Showing usage help as part of tooltips

**URL:** <https://forum.alternetsoft.com/t/showing-usage-help-as-part-of-tooltips/265>\
**Category:** AlterNET Studio Support\
**Tags:** editor, windows-forms\
**Created:** [November 24, 2021, 8:08am UTC](https://forum.alternetsoft.com/t/showing-usage-help-as-part-of-tooltips/265 "2021-11-24T08:08:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewS](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/a/606060/32.png) [@AndrewS](https://forum.alternetsoft.com/u/AndrewS)\
**Post date:** [November 24, 2021, 8:08am UTC](https://forum.alternetsoft.com/t/showing-usage-help-as-part-of-tooltips/265/1 "2021-11-24T08:08:33Z")

</div>

Is there any way to import the comments associated with properties/functions that are imported from a DLL when using the JavaScript parser?

i.e. Here is what the tooltip shows in the demo application:

 ![image](https://forum.alternetsoft.com/uploads/default/original/1X/9af48ac1dfd9d6ef8e0718b683060a8d97529791.png)

Here is what I see in Visual Studio:

 ![image](https://forum.alternetsoft.com/uploads/default/original/1X/88dfdcb6701b3ad3025e746e893f98995f25e03b.png)

It would be great if there is some sort of option or additional call I can make in my code that would enable this.

---

<div class="post-metadata">

**Author:** ![dmitry.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/dmitry.medvedev/32/27_2.png) [@dmitry.medvedev](https://forum.alternetsoft.com/u/dmitry.medvedev)\
**Post date:** [November 25, 2021, 3:51am UTC](https://forum.alternetsoft.com/t/showing-usage-help-as-part-of-tooltips/265/2 "2021-11-25T03:51:41Z")

</div>

Hi Andrew,

JavaScript/TypeScript parsers have built-in support for JavaDocs, so it will display descriptions for method/ method parameters if they’re defined.

```auto

/**
Converts a level name or value to a {@link logging.Level} value.
If the name/value is not recognized, {@link logging.Level.ALL} will be returned.
@param {(number|string)} nameOrValue The log level name, or value to convert .
@return {!logging.Level} The converted level.
*/
function getLevel(nameOrValue : string | number) : number {
    return 0;
    getLevel(1); // this will show signature help with parameter descriptions
}

```

The problem for types/methods coming from .NET Framework is that we do not include these JavaDoc comments when we generate .d.ts files. One of the reason that will make these d.ts files a lot larger and most likely will affect performance of code parsing and script execution.

We do have a support for descriptions for .NET classes, but not for immediate release.

From initial investigation there seem to be these two options here - one is to put java docs in the generated .d.ts files (provided that performance impact is tolerable), another one - is to load descriptions on-demand (this is what we do for our advanced C# parsers in DescriptionHelper class - by locating .NET xml files and loading/parsing their content).  
In both cases there should be xml files to start with (from memory they’re only installed with .NET SDK, not with .NET Framework itself).

Second approach so far look more promising, however SignatureHelpItems returned by TypeScript service, does not seem to contain a qualified name of the symbol to the left of the method, only names of the methods and parameters, so in order to construct a lookup key we might need to do another call to the parser to find out this qualified name.

Let me know how soon you need this feature and we work on it sooner if needed.

Kind regards,  
Dmitry

---

<div class="post-metadata">

**Author:** ![AndrewS](https://forum.alternetsoft.com/letter_avatar_proxy/v4/letter/a/606060/32.png) [@AndrewS](https://forum.alternetsoft.com/u/AndrewS)\
**Post date:** [November 25, 2021, 4:06am UTC](https://forum.alternetsoft.com/t/showing-usage-help-as-part-of-tooltips/265/3 "2021-11-25T04:06:35Z")

</div>

I’m actually more interested in showing help for the few dozen methods exposed from my own DLL rather than exposing everything from the .NET framework. Comments in my classes use the standard triple-slash format:

```auto
/// <summary>
/// Gets the current time
/// </summary>
public DateTime GetCurrentTime()
{
    return DateTime.Now;
}

```

It would be great if there was an option to convert these comments into JavaDocs format and include them in the .d.ts files. It could be turned off by default so that it doesn’t impact size/performance unless the developer makes a choice to turn it on and live with the impact.

This is not particularly urgent, just a nice to have when/if you guys have time to implement it.

---

<div class="post-metadata">

**Author:** ![dmitry.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/dmitry.medvedev/32/27_2.png) [@dmitry.medvedev](https://forum.alternetsoft.com/u/dmitry.medvedev)\
**Post date:** [November 25, 2021, 4:15am UTC](https://forum.alternetsoft.com/t/showing-usage-help-as-part-of-tooltips/265/4 "2021-11-25T04:15:29Z")

</div>

Hi Andrew,

We will look at what’s required to generate these JavaDocs and I will get back to you.

Regards,  
Dmitry

---

<div class="post-metadata">

**Author:** ![dmitry.medvedev](https://forum.alternetsoft.com/user_avatar/forum.alternetsoft.com/dmitry.medvedev/32/27_2.png) [@dmitry.medvedev](https://forum.alternetsoft.com/u/dmitry.medvedev)\
**Post date:** [November 29, 2021, 11:52pm UTC](https://forum.alternetsoft.com/t/showing-usage-help-as-part-of-tooltips/265/5 "2021-11-29T23:52:30Z")

</div>

Hi Andrew,

This should work now, please refer to the following post:

> [@Memory leaks every time JavaScript is compiled](https://forum.alternetsoft.com/t/memory-leaks-every-time-javascript-is-compiled/266/5):
>
> Hi Andrew, Please try this hotfix: [https://drive.google.com/file/d/1vyZw6gdjYB8mc0VBSiK9iDbBG02K2w\_L/view?usp=sharing](https://drive.google.com/file/d/1vyZw6gdjYB8mc0VBSiK9iDbBG02K2w_L/view?usp=sharing) It should address issues with cashing d.ts files, memory leak and also allow to generate JavaDocs (you would need to set GenerateDescriptions option for the assembly host item): "hostAssemblies": [ { "alias": "\_TestLibrary", "name": "TestLibrary", "options": "GlobalMembers,GenerateDescriptions" } Let me know if it works for you. Regards, Dmitry

Regards,  
Dmitry
