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
 Document method suggestions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SaloS
Junior Member

23 Posts

Posted - Sep 21 2006 :  03:26:52 AM  Show Profile  Reply with Quote
I have some suggestions about document method.
1) Why is it possible to document only methods but not classes and variables? Can you add separate autotext entities for documenting members of class and classes.
2) Can you add variable like $OptionalReturn$ in Document Method that means that if method is constructor, destructor or has type void then this line is not printed into comments. It is not very convinent to remove "returns" line from comment for each listed above types of functions.

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 22 2006 :  02:25:52 AM  Show Profile  Reply with Quote
For item 1, could you get what you want with an autotext entry that includes the selected text (forcing you to pre-select the variable or class name)?

For item 2, I have added the removal of the "returns" line for constructors and destructors. I believe that "Returns: void" is useful information, so I have omitted it from the case. Admittedly, "Returns: nothing" would be better, but that seems a little too much to ask.

Joe Pizzi
Go to Top of Page

SaloS
Junior Member

23 Posts

Posted - Sep 25 2006 :  01:58:50 AM  Show Profile  Reply with Quote
For first item. Let's imaging that you have class declaration. I need the following construction:

/// <summary>Summary for my class</summary>
class CMyClass : public CBaseClass
{
...
};
It not very convinent to select all the line that starts from 'class' (I don't know another method to add line above class declaration). I think it easier to add one item to dropdown menu that like "Document class" (to existing 'Add member' and 'Rename') that make the similar things as "Document method" i.e. Add come template for documenting class.
The same thing I need for variables(memebers). It would be nice if I have separate templates for documenting classes members and methods. It means that in Autotext section of options I would like to have item "Refactor Document Method", "Refactor document class", "Refactor Document variable".

For Second Item. I use followinf template for documenting methods
// ================================================================
/// <Summary></Summary>
/// <param name="$MethodArgName$"></param>
/// <returns></returns>
// ================================================================
I'd like not to have '<returns></returns>' line if method is construtor, destructor or return void.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 27 2006 :  01:00:17 AM  Show Profile  Reply with Quote
I notice that I failed to mention the case number for the feature request.

case=2650 (constructors and destructors)

case=1755 covers general methods with a return type of void.

For documenting a class, you could create an autotext entry to do this. I just tried it and came up with this (I called it Document Class):

/// <summary>Summary for </summary>
$selected$

Place the cursor on the class declaration line, and shift-right-click. The entry shows up on the "Autotext with $selected$" menu.

Joe Pizzi

Edited by - jpizzi on Sep 27 2006 01:00:52 AM
Go to Top of Page

SaloS
Junior Member

23 Posts

Posted - Sep 27 2006 :  03:43:17 AM  Show Profile  Reply with Quote
As I talked you to document class or variable I need to select all line. It's not very convinent.
Also there is one inconvinent with shift-right-click. When I do shift-right-click VA tryes to find all referencies of class. But some menu appears and at once disappears. I use VA version 10.3.1534.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 30 2006 :  11:36:54 PM  Show Profile  Reply with Quote
When I tried it, I positioned the cursor at the beginning of the line, I did not select the whole line. But, positioning the cursor in the middle of the line does add some problems.

Instead, I came up with this macro. You can put this into a module and assign a hotkey to it. It does not require you to be positioned in any certain spot in the line, nor does it require you to select anything.

Sub MyMacro()
DTE.ActiveDocument.Selection.StartOfLine(VsStartOfLineOptions.VsStartOfLineOptionsFirstText)
DTE.ActiveDocument.Selection.NewLine
DTE.ActiveDocument.Selection.LineUp
DTE.ActiveDocument.Selection.Text = "/// <summary>Summary for </summary>"
DTE.ActiveDocument.Selection.CharLeft(False, 10)
End Sub

As for the shift-right-click popping up a menu, then selecting something on it and executing it (which is what you seem to be describing), we have had reports of this happening in the past, but none of us was ever able to reproduce it.

Sometimes, when I shift-right-click, the menu pops up, then dissappears, but nothing is ever (apparently) executed for me. Wanna try to chase this one?

Joe Pizzi
Go to Top of Page

SaloS
Junior Member

23 Posts

Posted - Oct 02 2006 :  01:57:34 AM  Show Profile  Reply with Quote
I downloaded version 10.3.1535. The problem with context menu is the same. To reproduce do following:
1) Set caret position on name of function in cpp file (i.e. implementation of function)

2) shift-right-click nearby the caret.
So you will see that VA is trying to find all referencies.

Thanks for macro but I already use somthing like that.
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Oct 02 2006 :  09:32:31 AM  Show Profile  Reply with Quote
Did you make a short cut so Shift+Right Click executes the VAssistX.FindReferences command? VA X hijacks Shift+Right Click. So if you did make that command a shortcut to Shift+Right Click then what you are seeing is the IDE fighting over those two commands.

http://www.wholetomato.com/products/features/menu.asp

Shift+Right click is fixed by VAX and cannot be changed.

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

SaloS
Junior Member

23 Posts

Posted - Oct 03 2006 :  02:15:45 AM  Show Profile  Reply with Quote
I don't know how to use in shortcut right click of mouse. I always thought that shortcut could be only keyboard keys. I'll be very thankful if you give me such information.
I don't want to set new shortcut for this menu. I want that it works. I try Shift+Application and it works. I see the menu. There is nothing happen until I select any menu item or close menu.
However when I try to Shift+Right Click happens following:
1) If caret position and click are on one item (i.e. variable function and so on) then menu appears, disappear and VA executes VAssistX.FindReferences command
2) If caret position and click are on different items then menu appears, disappear and nothnig more happens.

If it helps you I use Visual C++ keyboard mapping scheme in Visual Studio 2005.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 03 2006 :  1:10:44 PM  Show Profile  Reply with Quote
i have just emailed you via the forum, can you reply to that email with your VS2005 settings file attached please?

i have just double checked this myself, using VS2005, C++, and VA 1535. the VA right click menu opens normally for me, and nothing is being automatically selected or triggered.

do you have any other plugin's installed?
do you have any utilities running that might be effecting the mouse or keyboard?
which OS are you using?

i recall Uniwares reporting something very similar a few builds ago, but it just stopped happening on his system, and we were never able to reproduce it, or find the cause.

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

SaloS
Junior Member

23 Posts

Posted - Oct 04 2006 :  01:50:05 AM  Show Profile  Reply with Quote
1) Yes I have some additional plugins. But They are written by my own and they not hook anything and set only keyboard shotcuts.
2) No I have no any utulities that hook keyboard or mouse events.
3) I'm using Windows XP SP2 with all current updates.

One more details I found. If you make right click on right side of text editor (where breakpoints and bookmarks are) without shift you can see menu that you described.
Is it normal? Or it should not happen?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 05 2006 :  08:33:59 AM  Show Profile  Reply with Quote
I have your email, thank you for that. I have just imported your settings into VS2005 running under win2k, and I cannot reproduce the problem. The VA right click menu appears quite happily for me, all of the time.

I have also tried this in VS2005 running under winXP SP2, and again no problems.

The VA menu appearing when you right click on the far left hand side is by design, so yes, quite normal

can you try unloading your other addin's to see if this makes any difference? it is possible they are interacting with VA somehow. In order to work VA does have to do a lot of "odd" things.

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

SaloS
Junior Member

23 Posts

Posted - Oct 05 2006 :  09:09:17 AM  Show Profile  Reply with Quote
All of my plugins are not loaded by default. I need to click in menu to load them.
Probably screen resolution can influence I have 1280*1024.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 05 2006 :  11:31:00 AM  Show Profile  Reply with Quote
i am running at the same resolution in my host OS, and i have just set my test VMWare machine to run full screen, so it has the same resolution.

i am doing the following:
* load VS2005
* open a C++ project and pick a line of code in a cpp file
* left click with the mouse near the start of a variable or function name
* press and hold the left shift key
* right click with the mouse on the same variable or function name
* release the left shift key

the VA right click menu appears as normal and nothing is selected. i have tried this many several times, and it works perfectly every time for me.

does this sound correct? am i missing some key step?

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

SaloS
Junior Member

23 Posts

Posted - Oct 06 2006 :  04:03:29 AM  Show Profile  Reply with Quote
Yes it correct.
I made some more tests and found out following.
1) under VS 2003 everything is ok (I tested inly C++ projects)
2) under VS 2005 it is not work correct for both C++ and C# projects.
However I found the way how to show context menu. It's not very easy. I need to do following:
after press down right mouse button I need to release Shift button until I release right mouse button. If I do that very quickly I get the menu. However if I hold for some time (1 second enouth) right mouse button and then release it I get starting find references independent I released shift button or not.
I think my computer is not very slow for VA (P IV 3000 2Gb memory)

P.S.
I am going on my vocations next week. So I cannot answer your questions if they appear.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Oct 13 2006 :  01:07:56 AM  Show Profile  Reply with Quote
In VS2005 with VAX 1538 and a C++ project (with as weird as this is, who knows what is relevant), if I shift-right-click, it doesn't matter how long I hold down the mouse button: if I release the shift key first, I get nothing. Otherwise, I get the VAX menu.

My machine is a P IV, 2.4GHz, 1GB RAM, so no, yours is not too slow.

Joe Pizzi

Edited by - jpizzi on Oct 13 2006 01:19:08 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Oct 13 2006 :  1:55:36 PM  Show Profile  Reply with Quote
can you try turning off VA's refactoring icon, the hovering down arrow, using the following registry key, and see if it makes any difference:

Set the binary value "DisplayRefactorButton" to zero in:

HKCU \\ Software \\ Whole Tomato \\ Visual Assist X \\ VANet8 \

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000