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

Dans
Senior Member

Ukraine
45 Posts

Posted - Jul 25 2007 :  12:40:57 PM  Show Profile  Reply with Quote
I suggest to create more intuitive way for navigating between Definition <-> Declaration <-> overloads

Lets call this navigation as Navigate Up/Navigate Down. Ctrl+Shift+Up/Ctrl+Shift+Down keys can be binded by default.

Navigate Up:

From Definition:

Carret is somewhere in the method or function
bla.cpp
void BlaBla::somemethod ()
{
  // bla bla
  |
  // bla bla
}

In this case VA should jump to declaration of this method in class BlaBla

Exceptions:

  • Method not declared in class: message box or suggest to create declaration

  • Class for method not found: message box with appropriate error

  • Found two classes



From Declaration:

Carret is on the method (everywhere in method/function's line(s))
bla.h
class BlaBla
{
public:
   void somemethod(int value);   
   void method1();   
...
...
 | void somemethod();   
...
...
   void method2();   
}

In this case VA should jump to somemethod declaration with int parameter (next overload). Jumping through overloads should be cycled.

Carret somewhere outside any function in cpp - jump to header

Navigate Down:

It should have similar implementation:
Jump from definition should search for overloaded definitions.
Jump from declaration should jump to appropriate method definition.
If method has definition in class's declaration section, simply put carret to first method's body character.

Exceptions:

  • Method not defined: message box or suggest to create definition


Carret somewhere outside any function in header file - jump to cpp

---------------------------------------------

Also as overloads can be treated constructor(s) and destructor. It will help to examine constructor's and destructor's code, especially for searching memory leaks.

For Navigate Up/Navigate Down you can create many modifications:

  • Cycle files that declare selected namespace

  • Jump from includes section of header file to includes section of appropriate cpp file

  • Jump to class's forward declaration

  • Jump between templates with the same name

  • ...



What do you think about implementing this?
It will really help in navigation through tons of source code especially during refactoring or understanding somebody else's work.

BTW,
Thanks for great product!

TIA,
Dans

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jul 25 2007 :  2:21:48 PM  Show Profile  Reply with Quote
Interesting.

Are you familiar with the Hovering Class Browser, the bottom half of VA View? This will show you the class, its functions, and if you turn on:

VA View -> Right Click -> Show current scope when typing

then VA will show you the current function / class while the caret is in the middle of a class.

I know this is not quite the same as what you are describing here.

Currently VA does not have sufficient understanding of overloaded functions to do what you are describing here. This is why when you use alt-g on an overloaded function VA will list all of the overloads in the alt-g menu, allowing you to pick the one you want to jump to.

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

Dans
Senior Member

Ukraine
45 Posts

Posted - Jul 26 2007 :  04:34:00 AM  Show Profile  Reply with Quote
quote:

Are you familiar with the Hovering Class Browser, the bottom half of VA View? This will show you the class, its functions, and if you turn on:

VA View -> Right Click -> Show current scope when typing

then VA will show you the current function / class while the caret is in the middle of a class.

I know this is not quite the same as what you are describing here.


I examined all VA features before suggesting this one.
I use VA View frequently but as you mentionaed it's not the same thing. In this case i need to: position mouse to view, invoke popup, read text, select menu item. It's about 3-5 seconds instead of pressing simple shortcut and see results.
quote:

Currently VA does not have sufficient understanding of overloaded functions to do what you are describing here. This is why when you use alt-g on an overloaded function VA will list all of the overloads in the alt-g menu, allowing you to pick the one you want to jump to.


Ok, overloads it's not main goal of this suggestion.
Main things are:
Navigate from method body to declaration (and backward) without plasing carret exactly on the method identifier (i think it's trivial to detect method's body scope).
Cycle Constructor(s) - Destructor.
If you can not detect exact method, you can show Alt-G popup.

BTW,
Can you position Alt-g popup menu under Carret, not mouse cursor? Sometimes my mouse cursor somewhere in space :) As i know it's easy with WinAPI

TIA,
Dans
Go to Top of Page

Telia
Starting Member

1 Posts

Posted - Jul 26 2007 :  05:39:16 AM  Show Profile  Reply with Quote
Great idea that can significantly improve VA usability. I thought about something similar in the past but didn't find time to think it out carefully and suggest in such complete form.

All C++ developers who tried another languages that don't require separating of class declaration and implementation (e.g. Java, Python etc.) will agree with me that frequent moving between declaration and implementation can be annoying enough. And VA can really help us here.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jul 26 2007 :  08:28:35 AM  Show Profile  Reply with Quote
The idea of jumping between the declaration and implementation regardless of position in either makes sense, and I have put in a feature request for this:

case=7894

I can see why cycling through the constructors is a useful idea, but really this is just a special case of cycling through all overloads.

A couple of thoughts occur to me here. Firstly if your overloaded constructors are grouped together in the cpp file then next and previous scope is a fast and easy way of moving from one to another, since this lets you move through a file one function at a time:

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

A second thought, you may also find VA Outline useful. This is currently in beta, and you need to enable it with a registry key before you can use it:

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

It will help you quickly group the overloads within a file, and also can be very useful for navigating through the current file.


The position of the alt-g menu has come up before. Short of adding an option the problem is that people who are mouse orientated use the mouse to select the item they want from the menu, so they want the menu to appear where the mouse cursor is. At the same time people who are keyboard oriented want the menu to appear next to the caret, since they will be using the keyboard to move through it.

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

Dans
Senior Member

Ukraine
45 Posts

Posted - Jul 26 2007 :  09:59:44 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

The idea of jumping between the declaration and implementation regardless of position in either makes sense, and I have put in a feature request for this:

case=7894

I can see why cycling through the constructors is a useful idea, but really this is just a special case of cycling through all overloads.

A couple of thoughts occur to me here. Firstly if your overloaded constructors are grouped together in the cpp file then next and previous scope is a fast and easy way of moving from one to another, since this lets you move through a file one function at a time:

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


In this case i need to stop typing, get mouse in hand and start aiming to arrows. Or in keyboard variant add/use additional two shortcuts.
Usually i need to understand not mine code. It almost always has bad organization. It looks like mess :)
quote:

A second thought, you may also find VA Outline useful. This is currently in beta, and you need to enable it with a registry key before you can use it:

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

It will help you quickly group the overloads within a file, and also can be very useful for navigating through the current file.


Good one!! Really. Continue improving this. I'll post my comments after few days using this feature.

quote:

The position of the alt-g menu has come up before. Short of adding an option the problem is that people who are mouse orientated use the mouse to select the item they want from the menu, so they want the menu to appear where the mouse cursor is. At the same time people who are keyboard oriented want the menu to appear next to the caret, since they will be using the keyboard to move through it.


And we need compromise, i don't like mouse programming :). Usually I spend few hours for configuring shortcuts for new expert.
How about additional option in settings: "Use carret position for Goto Implementation"? It will help in situation when mouse cursor in another monitor.

Thanks,
Dans
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jul 26 2007 :  2:43:58 PM  Show Profile  Reply with Quote
Next and previous scope have the default keyboard shortcuts of Alt+Up Arrow and Alt+Down Arrow, which became second nature to me quite a few years ago

VA Outline is proving really rather popular, for obvious reasons. Don't worry, we are continuing to improve this.

I have put in a feature request to control the position of the alt-g menu, having the menu appear on the second (or possibly 3rd) monitor is certainly going to be a bit unhelpful for keyboard focussed programmers:

case=7901

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

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jul 26 2007 :  6:07:11 PM  Show Profile  Reply with Quote
I think it will be more useful, if VAX decide the position depending on usage.

- If I triggered from keyboard (alt+g) it should be display @ caret
- If I press goto button, it should be display itself @ mouse pointer

In this way you don't need to put an another checkbox into the options dialog, and it will be much more handful and automatic.
Go to Top of Page

Dans
Senior Member

Ukraine
45 Posts

Posted - Jul 27 2007 :  06:05:28 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

Next and previous scope have the default keyboard shortcuts of Alt+Up Arrow and Alt+Down Arrow, which became second nature to me quite a few years ago

I know these shortcut but i found that this is not usueful form me. It's for review code method after method. It will be prefer if you will use these shrtcuts, for exmple, for move entity up/down in code (entity = method, fucntion, class etc). Hmm, you do not have this feature , this is VA Outline function.
quote:
VA Outline is proving really rather popular, for obvious reasons. Don't worry, we are continuing to improve this.

Is there VA Outline discuss topic. I have a many ideas and bug reports...
quote:
I have put in a feature request to control the position of the alt-g menu, having the menu appear on the second (or possibly 3rd) monitor is certainly going to be a bit unhelpful for keyboard focussed programmers:

case=7901


Interseting to know in wich version this will be implemented
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jul 27 2007 :  08:00:58 AM  Show Profile  Reply with Quote
accord a good point. I knew I meant that when I put in the feature request, but I have just added a note to make this clear to everyone else

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

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jul 27 2007 :  08:07:08 AM  Show Profile  Reply with Quote
Dans for moving through long files you may find this helpful:

http://docs.wholetomato.com?W198

it does not mention VA Outline, but the outline is still in beta. I will need to update this when we release Outline as a finished feature.

There is no forum section for VA Outline, instead please start one thread per bug in the General Release section:

http://www.wholetomato.com/forum/forum.asp?FORUM_ID=12

Suggestions and ideas should go into the "Suggestions and Ideas" section, again one per thread:

http://www.wholetomato.com/forum/forum.asp?FORUM_ID=13

If you post 6 bugs and 14 suggestions in a single post / thread then it becomes very hard indeed to discuss any of it intelligently, hence the request to keep things separated out like this when ever possible.


As for case=7901 I have no idea when this will be done to be honest. We have quite a lot of outstanding bug reports and feature requests, with more arriving all the time. When it is done this thread should be updated with that information, and it will be mentioned in the list of changes for the new build.

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

Dans
Senior Member

Ukraine
45 Posts

Posted - Jul 27 2007 :  09:14:18 AM  Show Profile  Reply with Quote
quote:

As for case=7901 I have no idea when this will be done to be honest. We have quite a lot of outstanding bug reports and feature requests, with more arriving all the time. When it is done this thread should be updated with that information, and it will be mentioned in the list of changes for the new build.


Pity, quick navigation is most needful thing than syntax highlighting and super refactoring features. I lost about hour every day because of searching in code.

For example what i must do every day:
press Alt+G to see some method implemtation, then i want to know all about this method and his class
  • position carret on method name

  • invoke Visual Studio's comand Go to Declaration, damn - command don't work...

  • copy method name

  • switch to Header file

  • press Ctrl+F

  • paste method name

  • (sometimes setup match options)

  • and what i have: comments, methods from other classes (many classes)

  • o miracle i found this!! Navigate to another file... I forgot to drop bookmark. Damn it...
    continue algorithm again


With my suggestion i only need to press one shortcut without additional movements...

...inpatiently waiting for implementig case=7901, at least in minimal implementation
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jul 27 2007 :  10:39:56 AM  Show Profile  Reply with Quote
If you want to know about the method and its class then just show VA View, make sure keyboard focus is in the source code, and hover the mouse over a function name, or even a function *call*.

I agree that finding your way around code is important.

Looking at what you are describing the following thoughts come to mind:

* use OFIW to find the file you want - ideal if the file names are related to class names
* use FSIW to find the function or class you want
* when you are in a file use alt-m and just type a bit - a *lot* faster and easier than find, if you are looking for a specific function
* some of the time Find References is going to be what you need

case=7901 is not going to help with any of this, all this will effect is the position on screen of the alt-g menu, not its content.

As for alt-g its self, for simple cases just press alt-g and Enter without even looking for the menu. The first item in the alt-g menu should always be the function implementation. True this does not work so well for a function with 6 overloads, but it should work well most of the time.

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

Dans
Senior Member

Ukraine
45 Posts

Posted - Jul 27 2007 :  10:56:27 AM  Show Profile  Reply with Quote
quote:
If you want to know about the method and its class then just show VA View, make sure keyboard focus is in the source code, and hover the mouse over a function name, or even a function *call*.

I agree that finding your way around code is important.

Looking at what you are describing the following thoughts come to mind:

* use OFIW to find the file you want - ideal if the file names are related to class names
* use FSIW to find the function or class you want
* when you are in a file use alt-m and just type a bit - a *lot* faster and easier than find, if you are looking for a specific function
* some of the time Find References is going to be what you need


All of them needs additional View and analysis of this view (i'm trying to hide everyting to see more code) or it has few steps. It will help but...
BTW, look at Resharper they have everything that developer can imagine for quick navigation
quote:

case=7901 is not going to help with any of this, all this will effect is the position on screen of the alt-g menu, not its content.


Oops, sorry i put wrong case. Correct case is case=7894
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jul 27 2007 :  11:57:28 AM  Show Profile  Reply with Quote
I know very little about ReSharper, but by looking at their website I found this page:

http://www.jetbrains.com/resharper/features/navigation_search.html#full

On an initial read through I am not seeing much here that we do not already offer. What I am seeing quite a lot of are pictures of things you interact with, which leaves me a little confused, since you seem to want to just move without interacting with anything.

OFIW - the dialog is hidden until you trigger it
FSIW - the dialog is hidden until you trigger it
alt-m - you do need to show the context and definition fields, but they take up very little screen space
Find References Results - this is a standard IDE "tab", so you can set it to autohide, or just close it when you are not looking at it.
VA View - again this is a standard IDE "tab"
VA Outline - again an IDE "tab"

True the IDE "tabs" take up screen space when in use, but given the amount of information in these displays I am not sure how you could hope to have this information without it taking up room to display it.

I am confused.

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 - Aug 06 2007 :  04:41:26 AM  Show Profile  Reply with Quote
Just returned from vacation, so I hope you excuse my late answer to this topic

One of the issues, I understand, is the position of the popup menu normally triggered by [ALT]-g or (context) menu.

How about this: Whenever a VA command is executed that would open a context menu, check the mouse position.

  • If the mouse position is within the VS IDE window, use this to place the context menu.

  • If the mouse position is outside the VS IDE window, then the command couldn't be triggered via the mouse. In that case open the context menu at the caret's position.


This at least would prevent the context menu from appearing on a different monitor!

Plus, those people not using the mouse at all, can make sure to place the mouse outside the IDE's window, and will always get the context menu at the caret position.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 06 2007 :  06:51:25 AM  Show Profile  Reply with Quote
That is so obvious once someone suggests it

However it does raise the question of "when is the mouse over the IDE?"

When working with two monitors I normally have the code on one window, and various "tabs" on the second window, mainly Solution Explorer, VA View, Output, etc. So the mouse is always over some part of the IDE, regardless of which monitor it is on.

I suspect you really mean when the mouse is over the source code, thus ignoring the "fringe" parts of the IDE. However what happens with auto-hide tabs that open out over the code, and the disappear again? The fact that sometimes they are pinned in place, and sometimes left to autohide just complicates matters.

I do like this idea, I am just wondering how best to try and define "over the IDE"

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 - Aug 06 2007 :  10:44:28 AM  Show Profile  Reply with Quote
Hmm, to be honest it didn't occur to me that you could stretch the IDE over several monitor screens.

I said "over the IDE" because, first, I wasn't sure whether VA could actually determine what part of the IDE the mouse is currently hovering over, and second, context menus (in general) could be called from various places using the mouse, including the main menu - which might open up over virtually any other part of the IDE main window (or even outside, come to think of it)!

I suppose that VA *is* capable of determining whether or not the mouse is over the editor window though - how else would it be able to provide the refactoring icon? Also VA obviously *can* discern between a mouse hovering over parts of the code, or e. g. an autohide toolbar that happens to momentarily hover over it - it does not show the refactoring icon in that case, I just tried.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 06 2007 :  11:15:47 AM  Show Profile  Reply with Quote
As soon as you get any part of the IDE as a floating tool window you can happily shove these onto a second monitor. Of course once you start doing that you need to find a "window manager" IDE extension, so you can return all of the windows to your desired position when something happens to mess this up *sigh* I always found having IDE windows on a secondary monitor to the left (negative X co-ordinates) was a little fragile.

I am not sure how reliably VA can figure this out for the edge cases, but it should be reliable enough. The real question is, what do people expect?

When I read this I thought of how I normally end up with the mouse pointer over the IDE title bar (top of the screen) out of the way, so view this as "not" part of the IDE for the purposes of where to open menu's. But what about Find References Results that is set to autohide, but is currently open?

I am wondering if a good definition is "currently over code", this is a simple definition, bypasses all sorts of clever questions, and seems generally reasonable. How does this idea sound?

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 - Aug 06 2007 :  11:27:50 AM  Show Profile  Reply with Quote
I suppose since the original problem is opening a context menu at caret position, we are talking of the source code window only. So, "currently over code" sounds good to me.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 07 2007 :  08:01:08 AM  Show Profile  Reply with Quote
I have put a note about this onto

case=7901

since this complements, or may even replace the need for an option about where to open the alt-g menu.

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

support
Whole Tomato Software

5566 Posts

Posted - Oct 29 2007 :  01:56:55 AM  Show Profile  Reply with Quote
case=7901 is implemented in Build 1614
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