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
 Goto Implementation cursor positioning consistency
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

av0tar15
Junior Member

19 Posts

Posted - Oct 24 2008 :  07:28:39 AM  Show Profile  Reply with Quote
Hi,
As I understand I Alt+G (Goto Implementation) will navigate only if the cursor is on the name of the symbol. But if I

1) Put cursor on symbol name in .h file

2) Press Alt+G. I get to .cpp file and the cursor is before opening curly brace of the implementation.

3) Press Alt+G. I get to .h file and cursor is at the beginning of the line.

4) Press Alt+G. I get to .cpp file and the cursor is before opening curly brace of the implementation.

after this I can do (3) and (4) to infinity. But if I manually put cursor at the beginning of the line with method declaration or a curly brace of the implementation Alt+G wouldn't work. Looks like I need (1) to initiate (3)-(4) cycle.

My suggestion is either always cursor at symbol name or have Alt+G navigate to symbol if this is only symbol on the line as in case I've described above.

Actually the way I've discovered this is I've tried Alt+M (Browse methods in file) and then Alt+G. As Alt+M also positions cursor at the beginning of the line Alt+G doesn't work in this case too.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 24 2008 :  4:15:57 PM  Show Profile  Reply with Quote
Yes, if you go to a member function by alt+g and then press alt+g again, it will place you to the opposite place for ease of navigation.

It cannot be done if you place the cursor to the beginning of the line, because the outcome may be ambiguous. For example a member functions can have returning type, and you may want to jump to it's type declaration.

Alt+G after Alt+M is an another story, it makes sense.
Go to Top of Page

av0tar15
Junior Member

19 Posts

Posted - Oct 25 2008 :  8:55:41 PM  Show Profile  Reply with Quote
In most cases first symbol in line with method declaration is blank, due to indentation. I think it is safe to go to method definition in this case. This inference will also automatically fix Alt+M predicament.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 01 2008 :  1:36:02 PM  Show Profile  Reply with Quote
Well, I think if someone would like to use "goto" on a method, he will place the caret to the method instead of moving it somewhere else.
I think Alt+M is an exception.

Edited by - accord on Nov 01 2008 5:05:35 PM
Go to Top of Page

av0tar15
Junior Member

19 Posts

Posted - Apr 06 2009 :  08:01:32 AM  Show Profile  Reply with Quote
Well anyway, the whole point of my suggestion is that if one hot key makes sense after another (Alt+M, Alt+G for example) it would be good if I don't have to do any additional body moves between the pressing the two of them. For a large code base every tap and click counts.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Apr 10 2009 :  3:04:42 PM  Show Profile  Reply with Quote
quote:
Originally posted by av0tar15

In most cases first symbol in line with method declaration is blank, due to indentation. I think it is safe to go to method definition in this case. This inference will also automatically fix Alt+M predicament.



I do not get this comment. For a normal implementation in my code the line contains the return type, the class name, the function name, one or more parameters - all of which have a data type.

There may also be one or more macros or keywords on the line.

This is multiple symbols you may wish to use alt-g on.

We are considering an alt-g like command to jump between declaration and implementation regardless of the carets position on the line, or even when the caret is inside the function body:

case=7894

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