Page 1 of 1
IDE - Goto Variable Declaration
Posted: Sat Oct 30, 2010 5:40 pm
by skywalk
Hi,
Please add menu item(and shortcut-able) - Goto Variable Declaration.
ie. If cursor is on a variable (array, structure, constant, etc.), then applying menu pick or shortcut "Goto Variable Declaration" will jump to the Define/Global or instantiation of that variable.
And / or allow the user to change the behavior of the Variable Viewer.
Please no more inserting of the variable name into code.

More helpful to me to jump to the variable declaration.
Re: IDE - Goto Variable Declaration
Posted: Sun Oct 31, 2010 12:29 am
by PB
> If cursor is on a variable, menu pick or shortcut "Goto Variable Declaration"
> will jump to the Define/Global or instantiation of that variable
What do you mean? That the editor will jump to the "Declare" line for the variable?
Re: IDE - Goto Variable Declaration
Posted: Sun Oct 31, 2010 1:31 am
by skywalk
@PB, you got it
As of now, I have to [double-click] the variable, then hit [Ctrl+F] then [Enter].
But, the search function does not span beyond the current file.
So, then I have to hit [Ctrl+Tab].
Then [F3] and if not in that file...I have to close the search dialog once or twice.
Then repeat.

Re: IDE - Goto Variable Declaration
Posted: Sun Oct 31, 2010 11:00 am
by DarkDragon
Doesn't work with situations like this:
Code: Select all
Define A.l
; ...
Define A.l
; ...
A = 10
What to do then? Clone your monitor?
Re: IDE - Goto Variable Declaration
Posted: Sun Oct 31, 2010 11:32 am
by c4s
DarkDragon wrote:What to do then? Clone your monitor?
Go to the first declaration. At least it's better than nothing.
Re: IDE - Goto Variable Declaration
Posted: Sun Oct 31, 2010 12:55 pm
by PB
Out of curiosity: you don't normally redefine a variable's type once set,
so why would you need to jump to it so often that requires a dedicated
IDE function to do it?
Re: IDE - Goto Variable Declaration
Posted: Sun Oct 31, 2010 1:27 pm
by c4s
I thought the same but what about procedures?
For example I have several ones with "Protected Result", so maybe the IDE should then have an option like "Ignore Procedures"...
Re: IDE - Goto Variable Declaration
Posted: Sun Oct 31, 2010 4:57 pm
by skywalk
PB wrote:Out of curiosity: you don't normally redefine a variable's type once set,
so why would you need to jump to it so often that requires a dedicated
IDE function to do it?
This may or not be true for simple variables. However, with structures, if I need to add an element or whatever, it is so painful to get back to its definition. Or an array upper bound? Most often I just need to remember what other variables I defined or how I defined them. I do not use hungarian notation...arggh.
And what if the code is shared by several developers, then this is really, really helpful. No?
I kinda sorta have this feature with [Ctrl+K] which allows me to jump back and forth between the top and bottom of a procedure.
[Shift+F2] in Visual Studio, jumps to the current cursor's declaration point, anywhere in the project.
And [Ctrl+Shift+F2], brings you back. Currently [Ctrl+L] does not span the entire project.
Thanks for the questions. They continue to prompt me with edits to the request.
DarkDragon wrote:Doesn't work with situations like this:
Code: Select all
Define A.l
; ...
Define A.l
; ...
A = 10
What to do then? Clone your monitor?
Just follow the behavior of the search function (but allow me to search in reverse please.. [Shift+F3]).
In fact, I would want to know if I did this by mistake!