Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Goto Implementation cursor positioning consistency

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
av0tar15 Posted - Oct 24 2008 : 07:28:39 AM
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.
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 10 2009 : 3:04:42 PM
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
av0tar15 Posted - Apr 06 2009 : 08:01:32 AM
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.
accord Posted - Nov 01 2008 : 1:36:02 PM
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.
av0tar15 Posted - Oct 25 2008 : 8:55:41 PM
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.
accord Posted - Oct 24 2008 : 4:15:57 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000