Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 "Comments" for methods
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 12 2005 :  08:14:28 AM  Show Profile
When I type a method or hover the mouse over it, the comments for that method are displayed. What is the procedure to follow in my own code so that the comments will display when I hover the mouse over my own methods?

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 15 2005 :  07:11:55 AM  Show Profile
Is there no answer for this?
Go to Top of Page

SvenC
Tomato Guru

Germany
339 Posts

Posted - Apr 15 2005 :  07:48:26 AM  Show Profile
Place comments like below directly above your method prototype:

class X
{
// this is my foo func
void foo();
};

Should display "// this is my foo func" in the tooltip when you hover on any foo method call.

Bye,
SvenC
Go to Top of Page

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 15 2005 :  07:50:14 AM  Show Profile
What about using:

/*
** mmmm
*/

???
Go to Top of Page

SvenC
Tomato Guru

Germany
339 Posts

Posted - Apr 15 2005 :  10:31:45 AM  Show Profile
Should work also. If not: I cannot get to show the comment tooltip for methods with overloaded parameters.
So having this:

// help
void foo(int i);
void foo(doubld d);

... leads to getting no comment tooltip.

It seems also related to the VAX option Text Editor->Listboxes "Get content form default intellisense". Turning that option on (VAX 1301) doesn't give me any comment tool tips any more...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 15 2005 :  3:24:25 PM  Show Profile
*strange* i cannot get comments on functions to work in 1299 regardless of my "Get content form default intellisense" setting.

i need to fiddle around some more, and see if this is a machine specific quirk.

zen is the art of being at one with the two'ness
Go to Top of Page

ajtruckle
Ketchup Master

81 Posts

Posted - Apr 18 2005 :  01:26:18 AM  Show Profile
OK, well I have not tried these suggestions yet because it is unclear to me what I should be expecting. It seems that VAX is being looked into about this?

I confirm that i do use overloaded methods in my applications.

Andrew
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 18 2005 :  3:07:52 PM  Show Profile
quote:
Originally posted by SvenC

It seems also related to the VAX option Text Editor->Listboxes "Get content form default intellisense". Turning that option on (VAX 1301) doesn't give me any comment tool tips any more...



SvenC could you post a simple example showing how you have set up your comments so that VA is picking them up and showing them to you?

i have tried this on two different machines and i cannot get it to work, which seems wrong. it is always better when raising a case if i can say "this works while this does not work"

zen is the art of being at one with the two'ness

Edited by - feline on Apr 18 2005 3:08:30 PM
Go to Top of Page

SvenC
Tomato Guru

Germany
339 Posts

Posted - Apr 18 2005 :  4:52:02 PM  Show Profile
In VS.2003 + VAX1301:
Create a C++ Win32 console app with all the defaults. I named it cons2003 so I've got a con2003.cpp with _tmain in it. I add one header file which I name cons2003.h. I include this header in cons2003.cpp

The header looks like this:
#pragma once

class MyClass
{
public:
// this is in the tool tip
void foo();
};

And in my cons2003.cpp in the body of _tmain I write

MyClass m;
m.

Now I get a member popup box showing me the foo method and next to it on the right I get a two line colored tool tip:

void foo ()
// this is the tool tip

I have this options:
- in Fonts and Colors everythings checked except "stable symbols in italic".
- in Texteditor/Listboxes everything checked except "Get content from default intellisense" (when I change this one in my mini sample then I do get the comment tool tip but this time its the comment first then File: cons2003.h and the tool tip content is not colored - this did not happen in a real project which is a bit more complex then MyClass
- TextEditor/C/C++ changing "Display comments from source files when available" has no effect on this behaviour - the comment is always displayed.

HTH,
SvenC
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 19 2005 :  1:19:42 PM  Show Profile
This is a complicated issue but we acknowledge our implementation could use a change.

We believe the tooltip Sven describes is not the one in question. Select foo from the listbox in Sven's example then hover over foo. Sometimes you get a comment in the hovering tooltip; other times you do not.

In VC++ 6.0, there is a way to disable hovering tooltips in the IDE options. VA X disables the option then displays all of its own hovering tooltips, assuming "Get content from default Intellisense" is disabled. Everything is fine.

In VS.NET, there is no way to disable hovering tooltips from the IDE -- not in the options dialog and not any internal way of which we are aware. Regardless of settings in any options dialog, the IDE displays tooltips. Bummer.

Then despite its persistence in wanting to display tooltips, the IDE does not always display them. Hence, VA X displays them on occasion. VA X displays only if the IDE does not -- itself a difficult task to know if the IDE is not going to display. (It's not like the IDE was written to tell an add-in it won't display a tooltip.)

If you disable "Get contents from default Intellisense" in our options for VS.NET, you can get different tooltips for the same symbol. One is from the IDE and one is from VA X.

Hover over MyClass then hover over foo in Sven's example. You likely get a tooltip from VA X -- it has a comment. Notice the distance between the text and the border of the tooltip. It's larger than the distance from an IDE tooltip (done so coloring of tooltips is more clear.)



Slide your caret to the right but remain over foo. You get the IDE's tooltip. No comment. Small distance.



Disable VA X and hover. You see only IDE tooltips.

Behavior is likely different for those with read-only NCB files. We suspect the IDE displays none of its own tooltips.

We have a case open to resolve the inconstency in hovering tooltips. Unfortunately, we don't yet have a solution in mind.

Perhaps there is a way in VS2005 to disable IDE tooltips.

case=106
Go to Top of Page

SvenC
Tomato Guru

Germany
339 Posts

Posted - Apr 20 2005 :  03:11:27 AM  Show Profile
Just a wild guess: as you can do coloring stuff in the tooltip text, might that be a point to hook in some code for adding code comments to the tool tip or even to replace the VS tooltip alltogether with one of yours?

Bye,
SvenC
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 22 2005 :  5:00:29 PM  Show Profile
We can change color but we cannot change the size of the tooltip.

We have tried replacing the tooltip altogether. Not good. The IDE gets terribly confused.
Go to Top of Page

SvenC
Tomato Guru

Germany
339 Posts

Posted - Apr 24 2005 :  06:29:59 AM  Show Profile
When you tried to replace the tooltip, did you destroy the original HWND and create a new tool tip? Maybe you could keep VS happy if you just hide the tooltip window so that is HWND is still usable for further VS calls on its own tooltip window.
Just a simple guess - I think you already have some skills in coming up with wild workarounds to do all that VS integration
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000