Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-06

CodeTools commands question

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vojtěch Čihák

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180619/9283c61c/attachment.html>

Reply by email

Mattias Gaertner
to Vojtěch Čihák
Show quoted text 17 lines
[...] 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

Reply by email

Vojtěch Čihák
to Vojtěch Čihák:   is there a CodeTool command that can take me directly to procedure/method…

Thanks, it works.
 
Still, it would be nice to have two separate actions for this, Alt+Up and At+Down.  
V.
______________________________________________________________

Show quoted text 5 lines
Od: Mattias Gaertner via Lazarus Komu: 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 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

Reply by email

Ondrej Pokorny
to Vojtěch Čihák
Vojtěch Čihák 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

Reply by email

Martin Frb
to Ondrej Pokorny
Ondrej Pokorny wrote 9 lines
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.

Reply by email

Ondrej Pokorny
to Martin Frb
Martin Frb wrote 12 lines
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

Reply by email