Discussion:
[Lazarus] CodeTools commands question
Vojtěch Čihák via Lazarus
2018-06-19 14:57:11 UTC
Permalink
Hi,
 
is there a CodeTool command that can take me directly to procedure/method implementation?
 
Example:
 
function TTreeNode.GetTop: integer;
begin
  if TreeView <> nil then
    TreeView.UpdateAllTops|;  //<-- caret is HERE
  Result := FTop;
end;  
 
by default, Ctrl+Shift+Up and Ctrl+Shift+Down jump between declaration and implementation of TTreeNode.GetTop;
Alt+Up takes me to declaration of TTreeNode.UpdateAllTops; and Ctrl+Shift+Up/Down takes me to its implementation.
 
I'm looking for a way to get to implementation of UpdateAllTops directly ( Alt+Down would be nice ).
 
Thank you,
 
V.
Mattias Gaertner via Lazarus
2018-06-19 15:05:43 UTC
Permalink
On Tue, 19 Jun 2018 16:57:11 +0200
Vojtěch Čihák via Lazarus <***@lists.lazarus-ide.org> wrote:

>[...] Hi,
>  
> is there a CodeTool command that can take me directly to procedure/method implementation?
>  
> Example:
>  
> function TTreeNode.GetTop: integer;
> begin
>   if TreeView <> nil then
>     TreeView.UpdateAllTops|;  //<-- caret is HERE
>   Result := FTop;
> end;  
>  
> by default, Ctrl+Shift+Up and Ctrl+Shift+Down jump between declaration and implementation of TTreeNode.GetTop;
> Alt+Up takes me to declaration of TTreeNode.UpdateAllTops; and Ctrl+Shift+Up/Down takes me to its implementation.
>  
> I'm looking for a way to get to implementation of UpdateAllTops directly ( Alt+Down would be nice ).

Maybe this option helps: "Jump directly to method body"

http://wiki.lazarus.freepascal.org/IDE_Window:_Codetools_Options#Jumping_.28e.g._Method_Jumping.29



Mattias
--
Vojtěch Čihák via Lazarus
2018-06-19 17:22:45 UTC
Permalink
Thanks, it works.
 
Still, it would be nice to have two separate actions for this, Alt+Up and At+Down.
 
V.
______________________________________________________________
> Od: Mattias Gaertner via Lazarus <***@lists.lazarus-ide.org>
> Komu: ***@lists.lazarus-ide.org
> Datum: 19.06.2018 17:05
> Předmět: Re: [Lazarus] CodeTools commands question
>
On Tue, 19 Jun 2018 16:57:11 +0200
Vojtěch Čihák via Lazarus <***@lists.lazarus-ide.org> wrote:

Maybe this option helps: "Jump directly to method body"

http://wiki.lazarus.freepascal.org/IDE_Window:_Codetools_Options#Jumping_.28e.g._Method_Jumping.29 <http://wiki.lazarus.freepascal.org/IDE_Window:_Codetools_Options#Jumping_.28e.g._Method_Jumping.29>



Mattias
--
_______________________________________________
Lazarus mailing list
***@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus>
Ondrej Pokorny via Lazarus
2018-06-19 17:26:51 UTC
Permalink
On 19.06.2018 19:22, Vojtěch Čihák via Lazarus wrote:
> Still, it would be nice to have two separate actions for this, Alt+Up
> and At+Down.

I agree. But there is one problem: what to do with Ctrl+Click? AFAIK
Lazarus IDE cannot change mouse mappings, only key mappings. Or am I wrong?

Ondrej
--
Martin Frb via Lazarus
2018-06-19 17:42:09 UTC
Permalink
On 19/06/2018 19:26, Ondrej Pokorny via Lazarus wrote:
> On 19.06.2018 19:22, Vojtěch Čihák via Lazarus wrote:
>> Still, it would be nice to have two separate actions for this, Alt+Up
>> and At+Down.
>
> I agree. But there is one problem: what to do with Ctrl+Click? AFAIK
> Lazarus IDE cannot change mouse mappings, only key mappings. Or am I
> wrong?
>
> Ondrej
There is a whole config for the mouse.

If we have the action, we can add it to the choice of things that can be
assigned to mouse buttons.
--
Ondrej Pokorny via Lazarus
2018-06-19 17:53:36 UTC
Permalink
On 19.06.2018 19:42, Martin Frb via Lazarus wrote:
> On 19/06/2018 19:26, Ondrej Pokorny via Lazarus wrote:
>> On 19.06.2018 19:22, Vojtěch Čihák via Lazarus wrote:
>>> Still, it would be nice to have two separate actions for this,
>>> Alt+Up and At+Down.
>>
>> I agree. But there is one problem: what to do with Ctrl+Click? AFAIK
>> Lazarus IDE cannot change mouse mappings, only key mappings. Or am I
>> wrong?
> There is a whole config for the mouse.
>
> If we have the action, we can add it to the choice of things that can
> be assigned to mouse buttons.


Great, I forgot about it. Then - what myself concerns - the option can
be deleted and the command can be split into two:
1.) find declaration
2.) find declaration & jump to implementation

Btw. the mouse command is named "jump to implementation", which is wrong.

Ondrej

--
Loading...