Sign in Join

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

Mailing lists / lazarus / 2009-10

Code navigation in Lazarus 0.9.28

22 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

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

Juha Manninen

Hi.

Lazarus is getting impressive! Good.

The code navigation feature is nice but is not fully implemented. There are no back arrows taking you back to the previous code location. So, when you Ctrl-Click on a method name the editor jumps to the method's definition if its source code is available. However I didn't find a way to get back to the original location.
Delphi has 2 arrow buttons (back and forth like in web browser) for it and it works just beautifully.

Is this problem acknowledged? Should I make a bug report or something? I guess it would be easy to implement.

Version:
Lazarus 0.9.28 r22019M FPC 2.2.4 i386-linux-gtk 2 (beta) on OpenSuse 11.1.

Regards,
Juha Manninen

Reply by email

Henry Vermaak
to Juha Manninen

2009/10/26 Juha Manninen :

Show quoted text 14 lines
Hi. Lazarus is getting impressive! Good. The code navigation feature is nice but is not fully implemented. There are no back arrows taking you back to the previous code location. So, when you Ctrl-Click on a method name the editor jumps to the method's definition if its source code is available. However I didn't find a way to get back to the original location. Delphi has 2 arrow buttons (back and forth like in web browser) for it and it works just beautifully. Is this problem acknowledged? Should I make a bug report or something? I guess it would be easy to implement.

You can press ctrl-h to go back, too me bloody ages to find this out :-\

You can see all the key mappings under Environment->Options.

Henry

Reply by email

Mattias Gärtner
to Henry Vermaak

Zitat von Henry Vermaak :

Show quoted text 20 lines
2009/10/26 Juha Manninen : > Hi. > > Lazarus is getting impressive! Good. > > The code navigation feature is nice but is not fully implemented. > There are no > back arrows taking you back to the previous code location. > So, when you Ctrl-Click on a method name the editor jumps to the method's > definition if its source code is available. However I didn't find a > way to get > back to the original location. > Delphi has 2 arrow buttons (back and forth like in web browser) for > it and it > works just beautifully. > > Is this problem acknowledged? Should I make a bug report or something? > I guess it would be easy to implement. You can press ctrl-h to go back, too me bloody ages to find this out :-\

That's strange, because it is not hidden:

It is in the menu: Search / Jump Back.
AFAIK windows, gtk, qt and carbon are showing the short cut.

It is documented in the lazarus tutorial and the lazarus ide tools.

You can see all the key mappings under Environment->Options.

About the two arrows:
The Delphi buttons are on the tabs. This is not possible under all widgetsets (at least not easily).
You can install the package 'editortoolbar', which adds a configurable toolbar in the source editor. Then you add the 'Jump Back/Jump forward' menu items to the bar.

Mattias

Reply by email

Henry Vermaak
to Mattias Gärtner

2009/10/26 Mattias G?rtner :

Show quoted text 7 lines
Zitat von Henry Vermaak : > You can press ctrl-h to go back, too me bloody ages to find this out :-\ That's strange, because it is not hidden: It is in the menu: Search / Jump Back. AFAIK windows, gtk, qt and carbon are showing the short cut.

Yes, I noticed this, eventually (maybe the short cuts weren't shown in old versions?). I'm just a bit slow :)

Henry

Reply by email

Martin
to Juha Manninen: Hi. Lazarus is getting impressive! Good. The code navigation feature is nice but is not…
Juha Manninen wrote 21 lines
Hi. Lazarus is getting impressive! Good. The code navigation feature is nice but is not fully implemented. There are no back arrows taking you back to the previous code location. So, when you Ctrl-Click on a method name the editor jumps to the method's definition if its source code is available. However I didn't find a way to get back to the original location. Delphi has 2 arrow buttons (back and forth like in web browser) for it and it works just beautifully. Is this problem acknowledged? Should I make a bug report or something? I guess it would be easy to implement. Version: Lazarus 0.9.28 r22019M FPC 2.2.4 i386-linux-gtk 2 (beta) on OpenSuse 11.1.

If you have a 5 button mouse, it is alos assigned to the 2 extra buttons (forward/backward).

If you don't have a 5 button mouse, you can look at the advanced mouse options (press f! for help) and change the setting to something like ctrl-right, alt-right, or ctrl-middle ...

Martin

Reply by email

Graeme Geldenhuys
to Juha Manninen: Hi. Lazarus is getting impressive! Good. The code navigation feature is nice but is not…
Juha Manninen wrote
definition if its source code is available. However I didn't find a way to get back to the original location.

Ctrl+H to take you back.
Ctrl+Shift+H to take you forward again.

I never thought of putting the button on the Editor Toolbar, but did so now. That is a nice solution - I use the editor toolbar extensively for other features.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Mattias Gärtner: Zitat von Henry Vermaak : That's strange, because it is not hidden: It is in the menu:…
Mattias G?rtner wrote
toolbar in the source editor. Then you add the 'Jump Back/Jump forward' menu items to the bar.

Nice one, I for some reason never thought about doing that. :-) Yet I use the editor toolbar for just about everything else.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gärtner
to Graeme Geldenhuys

Zitat von Graeme Geldenhuys :

Show quoted text 7 lines
On 26/10/2009, Mattias G?rtner wrote: > toolbar in the source editor. Then you add the 'Jump Back/Jump forward' menu > items to the bar. Nice one, I for some reason never thought about doing that. :-) Yet I use the editor toolbar for just about everything else.

I guess the jump buttons can be very useful for beginners too. I added the toolbar as ToDo to the education package: http://wiki.lazarus.freepascal.org/Lazarus_for_education

Mattias

Reply by email

Mattias Gärtner
to Martin: If you have a 5 button mouse, it is alos assigned to the 2 extra buttons…

Zitat von Martin :

Show quoted text 7 lines
[...] If you have a 5 button mouse, it is alos assigned to the 2 extra buttons (forward/backward). If you don't have a 5 button mouse, you can look at the advanced mouse options (press f! for help) and change the setting to something like ctrl-right, alt-right, or ctrl-middle ...

Martin, maybe you can add a hint about that on

http://wiki.lazarus.freepascal.org/Lazarus_Tutorial#The_Search_sub-menu http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Find_Declaration http://wiki.lazarus.freepascal.org/IDE_tricks

Mattias

Reply by email

Mattias Gärtner
to Vincent Snijders: I doubt that "View debugger output" is a useful button for beginners. Vincent

Zitat von Vincent Snijders :

Show quoted text 8 lines
Mattias G?rtner schreef: > > I guess the jump buttons can be very useful for beginners too. > I added the toolbar as ToDo to the education package: > http://wiki.lazarus.freepascal.org/Lazarus_for_education > I doubt that "View debugger output" is a useful button for beginners.

True.
Where can they see the output of their writeln's?

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
True. Where can they see the output of their writeln's?

I think it's useful. Alternatively they should use the dbugintf unit (and SendDebug(...) calls) with the GUI debug server running in the background.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Vincent Snijders
to Mattias Gärtner: Zitat von Vincent Snijders : True. Where can they see the output of their writeln's?…
Mattias G?rtner wrote 13 lines
Zitat von Vincent Snijders : > Mattias G?rtner schreef: >> >> I guess the jump buttons can be very useful for beginners too. >> I added the toolbar as ToDo to the education package: >> http://wiki.lazarus.freepascal.org/Lazarus_for_education >> > > I doubt that "View debugger output" is a useful button for beginners. True. Where can they see the output of their writeln's?

Under windows a separate console is opened, in which the application runs. Small drawback, this window closes as soon as the application closes. So my console applications usually have a readln as last statement during development.

Vincent

Reply by email

Mattias Gärtner
to Vincent Snijders

Zitat von Vincent Snijders :

Show quoted text 19 lines
Mattias G?rtner schreef: > Zitat von Vincent Snijders : > >> Mattias G?rtner schreef: >>> >>> I guess the jump buttons can be very useful for beginners too. >>> I added the toolbar as ToDo to the education package: >>> http://wiki.lazarus.freepascal.org/Lazarus_for_education >>> >> >> I doubt that "View debugger output" is a useful button for beginners. > > True. > Where can they see the output of their writeln's? Under windows a separate console is opened, in which the application runs. Small drawback, this window closes as soon as the application closes. So my console applications usually have a readln as last statement during development.

So, no compare with old output, only windows, no search and no highlighting. I guess eventually we need a terminal control.
I added it as ToDo.

Mattias

Reply by email

Juha Manninen
to Henry Vermaak: 2009/10/26 Juha Manninen : You can press ctrl-h to go back, too me bloody ages to find…

Hi,

You can press ctrl-h to go back, too me bloody ages to find this out :-\ You can see all the key mappings under Environment->Options.

Ok, now I found it, too. Not very intuitive!

There really should be buttons as an alternative method for this. It makes even more sense because you need the mouse anyway when jumping to a method definition. Logically you could use mouse also when coming back.

Juha Manninen

Reply by email

Hans-Peter Diettrich
to Juha Manninen: Hi. Lazarus is getting impressive! Good. The code navigation feature is nice but is not…
Show quoted text 7 lines
The code navigation feature is nice but is not fully implemented. There are no back arrows taking you back to the previous code location. So, when you Ctrl-Click on a method name the editor jumps to the method's definition if its source code is available. However I didn't find a way to get back to the original location. Delphi has 2 arrow buttons (back and forth like in web browser) for it and it works just beautifully.

Delphi offers ALT-LEFT and ALT-RIGHT (arrow keys!) for keyboard navigation. Never tested whether Lazarus offers the same shortcuts, but CTRL-H and CTRL-SHIFT-H are implemented.

DoDi

Reply by email

Aleksa Todorovic
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 6 lines
Juha Manninen schrieb: Delphi offers ALT-LEFT and ALT-RIGHT (arrow keys!) for keyboard navigation. Never tested whether Lazarus offers the same shortcuts, but CTRL-H and CTRL-SHIFT-H are implemented.

You can set them manually - I do it as soon as I install Lazarus :-)

Best,
Aleksa

Reply by email

Mattias Gärtner
to Aleksa Todorovic

Zitat von Aleksa Todorovic :

Show quoted text 10 lines
On Mon, Oct 26, 2009 at 14:36, Hans-Peter Diettrich wrote: > Juha Manninen schrieb: > > Delphi offers ALT-LEFT and ALT-RIGHT (arrow keys!) for keyboard navigation. > Never tested whether Lazarus offers the same shortcuts, but CTRL-H and > CTRL-SHIFT-H are implemented. > You can set them manually - I do it as soon as I install Lazarus :-)

Alt-Left/Right are not yet used.
I just tested: They work under linux/ubuntu/gtk2.
I guess, they can be added for linux/windows.

Mattias

Reply by email

Juha Manninen
to Graeme Geldenhuys: Ctrl+H to take you back. Ctrl+Shift+H to take you forward again. I never thought of…

Hello.

I open Help --> Online Help from Lazarus and then select "FCL - Free Component Library". I get the page: http://lazarus-ccr.sourceforge.net/docs/fcl/

Description there says:

The TDataset descendents have been implemented in a way that makes them compatible to the Delphi implementation of these units. There are other units that have counterparts in Delphi, but most of them are unique to Free Pascal.

However the unit defining TDataset (DB) is not listed. If I click [Index] I don't see TDataset or other related classes there either.

Juha Manninen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091027/52598622/attachment.html>

Reply by email

Vincent Snijders
to Juha Manninen
Juha Manninen wrote 15 lines
Hello. I open Help --> Online Help from Lazarus and then select "FCL - Free Component Library". I get the page: http://lazarus-ccr.sourceforge.net/docs/fcl/ Description there says: The TDataset descendents have been implemented in a way that makes them compatible to the Delphi implementation of these units. There are other units that have counterparts in Delphi, but most of them are unique to Free Pascal. However the unit defining TDataset (DB) is not listed. If I click [Index] I don't see TDataset or other related classes there either.

The db unit (and all the unit in the packages\fcl-db directory) have not yet been documented.

Vincent

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 19 lines
Juha Manninen schreef: > Hello. > > I open Help --> Online Help from Lazarus and then select "FCL - Free > Component Library". I get the page: > http://lazarus-ccr.sourceforge.net/docs/fcl/ > > Description there says: > > The TDataset descendents have been implemented in a way that makes them > compatible to the Delphi implementation of these units. There are other > units that have counterparts in Delphi, but most of them are unique to Free > Pascal. > > However the unit defining TDataset (DB) is not listed. If I click [Index] I > don't see TDataset or other related classes there either. The db unit (and all the unit in the packages\fcl-db directory) have not yet been documented.

It is a work in progress.

Michael.

Reply by email

Juha Manninen
to Mattias Gärtner: Zitat von Graeme Geldenhuys : I guess the jump buttons can be very useful for beginners…

Hi,

I think I didn't find the Ctrl+H shortcut myself from Search menu because I didn't do any search or find operation. This same Ctrl+H seems to work for all navigation which is good. ... but I still like the buttons, too.

I guess the jump buttons can be very useful for beginners too. I added the toolbar as ToDo to the education package: http://wiki.lazarus.freepascal.org/Lazarus_for_education

I read the wiki page and opened Packages / Configure installed packages in Lazarus. I don't see any educationlaz package there. It must be in the latest SVN version. That is OK. I will update later.

Now some UI design hints about this Configure installed packages dialog:

It is a convention to have a list of available items on left side and selected items on right side. Then the item moves from left to right when selected.

Also, the package already selected should be removed from the list of available packages.

Then I rebuilt the IDE. Could someone please explain what actually happens there. The whole IDE really gets compiled, right?
The original version was installed from RPM package with root account to /usr/lib/lazarus/lazarus.
The new version went to ~/.lazarus/bin/lazarus.
It is much bigger than the original, over 100 MB compared to 13 MB.

I think it would be less confusing to install the compiled version at the original location, using root password if necessary.

Anyway, it was impressive how this system rebuilt and rebooted itself, without the user (me) even knowing what happened.

I tried the same with QT4 widgets but it failed. It will be solved in the future I guess. No problem.

Regards,
Juha Manninen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091027/01c1ff2b/attachment-0001.html>

Reply by email