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
 Feature Requests
 VA Outline feature request
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mmb
Senior Member

42 Posts

Posted - May 01 2007 :  5:46:18 PM  Show Profile  Reply with Quote
I suggest to add the following features to the VA outline:

- comment/uncomment entity
- place #ifdef around

for both I would be useful to select multiple entities ...

holedigger
Whole Tomato Software

145 Posts

Posted - May 01 2007 :  6:41:27 PM  Show Profile  Reply with Quote
You can do both currently. First select the text by triple-clicking the node, or by right clicking and choosing "Select in Editor". Then type '#' to surround with and #ifdef, or '/' to comment the selection.

To select multiple nodes, use Ctrl+click.

Whole Tomato Software
Go to Top of Page

mmb
Senior Member

42 Posts

Posted - May 01 2007 :  6:54:11 PM  Show Profile  Reply with Quote
Sure but why not place both commands in the context menu?
Go to Top of Page

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - May 02 2007 :  07:06:55 AM  Show Profile  Reply with Quote
Surrounding with #ifdef already is (various alternatives available):

Shift-right-click / Insert Autotext / Autotext with $selected$ / #ifdef ... (choose one of the #ifdef entries available)

You can do the same for commenting (various alternate methods as well), although I don't think uncommenting would work well using this method.

But: why bother? This is way more complicated than doing it the way described by holedigger: select line(s), then type '#' or '*' or '/' as appropriate. '*' or '/' will alternately comment or uncomment your selection (uncomment will likely only work the way you expect if you used the same method to comment it in the first place)

I suppose it would be possible to put the same functionality into the context menu, but definitely not on top level (some people might object at cluttering their menu with redundant functions), so you will always have the added overhead of navigating several layers of submenus.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18942 Posts

Posted - May 02 2007 :  10:06:29 AM  Show Profile  Reply with Quote
Some people are keyboard focussed, some are mouse focussed, so it is normal to see people wanting both keyboard and mouse access to the same features.

In this case I would suggest using the toolbar button's for comment / uncomment and insert autotext if you want to use the mouse to update the code once you have selected it.

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - May 02 2007 :  11:42:50 AM  Show Profile  Reply with Quote
You have a point feline. I, too, prefer ways of doing sth. either by keyboard or by mouse over using both together.

I agree that toolbar buttons would be better than using any kind of menu/submenu - the VA Autotext menu is too awkward to navigate for such basic functions, and I'd rather not have the refactor menu cluttered with them either.

@mmb: You have mentioned 'multiple selections' - I didn't quite follow you there, since you cannot select multiple disjointed bits of text in an editor (not Visual Studio's, anyway). Or did you think of something more involved? It certainly sounds interesting!
Go to Top of Page

mmb
Senior Member

42 Posts

Posted - May 02 2007 :  4:51:49 PM  Show Profile  Reply with Quote
sl@sh:

The idea was the following: I need to comment out (or move into an #ifdef which happens more often on my kind of work or move to other file) some kind of code, typically some functions, type declarations and maybe even some #include's. If I already have such a tool like the outline, I simple could select/mark all the things I want to #ifdef'ed and then do whatever must be done to ifdef'ed.

So, having a

typedef x y;
int f();
itn g();
int h();

I could select y and h in the Outline and BOTH would be #ifdef'ed ...
Go to Top of Page

holedigger
Whole Tomato Software

145 Posts

Posted - May 02 2007 :  5:20:16 PM  Show Profile  Reply with Quote
I see now. Currently you can select multiple nodes in the outline and cut/copy/etc from the context menu, but you cannot select the multiple text sections in the editor in order to comment or ifdef them.

Whole Tomato Software
Go to Top of Page

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - May 03 2007 :  04:26:42 AM  Show Profile  Reply with Quote
I still don't understand what 'Outline' refers to, maybe this is a view only available with VS 2005? I'm working with VS 2003.

When I look at the class view I can certainly select multiple functions, and at least there's a copy function in the context menu (although I'm not sure where you can paste that). If 'Outline' is a view similar to that, I can see where you're going.

I'm not sure this would be within the scope of VA, as it is centered on modifying what's in the editor window. But if VA could do this it would certainly be interesting: I can for instance imagine the need to put #ifdefs around a number of functions that should only be available under certain conditions, or for different versions of the software.

I'd like to expand on this idea:

Currently, VA basically provides functions that modify code that is selected within the editor, or do something dependent on the current text cursor position within the editor. Would it be possible to use objects outside the editor as arguments for VA functionality in general? Examples would be items within the class view, or the HCB. The selected item(s) then should be used as pointers to the code that needs modification: VA should go to the items' definitions, select the code in order to get something to work with, then apply whatever VA function was called.

Edited by - sl@sh on May 03 2007 04:33:13 AM
Go to Top of Page

mmb
Senior Member

42 Posts

Posted - May 03 2007 :  10:03:59 AM  Show Profile  Reply with Quote
"VA Outline" is the the new VA view, see the "Sticky: Build 1554" posting in the Public Beta forum.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18942 Posts

Posted - May 03 2007 :  10:58:46 AM  Show Profile  Reply with Quote
You need to be running VA 1555 and set a registry flag to enable this feature, since it is still in beta.

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6149

I have put in a feature request for commenting / using autotext to surround selection on several functions at once via Live Outline, so we will see what people make of this:

case=6364

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