Sign in Join

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

Mailing lists / lazarus / 2018-09

IDE Spotter

51 messages · 14 people · –

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt

Hello,

I've polished something that was started during the Lazarus Pro conference in Bonn the last days, the IDE Spotter (this is a "Working Title").

The idea is to have a command box such as it exists in Atom or Visual code studio.

Press ALt-Shift-P (or Meta-Shift-P on Mac) to access it.

Type the command you wish (e.g. open), navigate with arrows or click on the correct match. The command will be executed. You can type multiple words. all parts must be matched (and are colorized).

You can find the package under 'components/idespotter' in SVN. It should also work under 1.8.4/2.0rc1 for those that want to try it.

There are some options under Tools - Options - Environment - IDE Spotter.

Ideas for improvements are currently:
- Shrink window list if the match list is "small".
- Search in recent files (projects/units/packages)
- ... ?

Please testdrive it.
Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)).

Thanks go to James Ralston for pitching the idea, and Mattias for including it in SVN !

Michael.

Reply by email

Michael Van Canneyt
to Florian Klämpfl
Florian Klämpfl wrote 5 lines
Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: > > Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). Unit IDESpotterOptions missing in svn?

Ahaha.... The infamous 'forgot to add units' problem in SVN :)

I added them, thanks !

Michael.

Reply by email

Florian Klämpfl
to Michael Van Canneyt
Michael Van Canneyt wrote 13 lines
On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >> >> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). > > Unit IDESpotterOptions missing in svn? Ahaha.... The infamous 'forgot to add units' problem in SVN :) I added them, thanks !

Seems not work on windows though, even after I assigned another shortcut.

Reply by email

Michael Van Canneyt
to Florian Klämpfl
Florian Klämpfl wrote 16 lines
Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: > > > On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > >> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >>> >>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). >> >> Unit IDESpotterOptions missing in svn? > > Ahaha.... The infamous 'forgot to add units' problem in SVN :) > > I added them, thanks ! Seems not work on windows though, even after I assigned another shortcut.

Hm. What does not work, showing the form ?

It's also in the menu under View - IDE internals - IDE spotter. Does it work then ?

Strange, I tested both Mac and Linux.

Michael.

Reply by email

Mattias Gaertner
to Florian Klämpfl: Seems not work on windows though, even after I assigned another shortcut.
Show quoted text 16 lines
Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: > > > On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > >> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >>> >>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). >> >> Unit IDESpotterOptions missing in svn? > > Ahaha.... The infamous 'forgot to add units' problem in SVN :) > > I added them, thanks ! Seems not work on windows though, even after I assigned another shortcut.

If you are using a docked IDE, I just fixed positioning the spotter for that case.

Mattias

Reply by email

Florian Klämpfl
to Mattias Gaertner
Mattias Gaertner wrote 22 lines
On Sun, 23 Sep 2018 17:23:46 +0200 Florian Klämpfl via Lazarus wrote: > Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: >> >> >> On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: >> >>> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: >>>> >>>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). >>> >>> Unit IDESpotterOptions missing in svn? >> >> Ahaha.... The infamous 'forgot to add units' problem in SVN :) >> >> I added them, thanks ! > > Seems not work on windows though, even after I assigned another shortcut. If you are using a docked IDE, I just fixed positioning the spotter for that case.

Indeed, this fixed it, thanks.

Reply by email

Michael Van Canneyt
to Mattias Gaertner: On Sun, 23 Sep 2018 17:23:46 +0200 If you are using a docked IDE, I just fixed…
Mattias Gaertner wrote 22 lines
On Sun, 23 Sep 2018 17:23:46 +0200 Florian Klämpfl via Lazarus wrote: > Am 23.09.2018 um 15:27 schrieb Michael Van Canneyt: > > > > > > On Sun, 23 Sep 2018, Florian Klämpfl via Lazarus wrote: > > > >> Am 23.09.2018 um 13:16 schrieb Michael Van Canneyt via Lazarus: > >>> > >>> Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). > >> > >> Unit IDESpotterOptions missing in svn? > > > > Ahaha.... The infamous 'forgot to add units' problem in SVN :) > > > > I added them, thanks ! > > Seems not work on windows though, even after I assigned another shortcut. If you are using a docked IDE, I just fixed positioning the spotter for that case.

Ah. That's what your change meant...

Good you left a comment now, many thanks! :)

(I guess everyone now guessed, I don't use the docking IDE...)

Michael.

Reply by email

Ralf Quint
to Marcos Douglas B. Santos
Marcos Douglas B. Santos wrote
On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus wrote: > (I guess everyone now guessed, I don't u I thought that I was the last one not using a docked IDE :)

Docked IDE (unless the term is used differently from how I understand it) doesn't make much sense if you have a multi-screen setup, IMHO...

Ralf

---
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email

Sven Barth
to Ralf Quint
Ralf Quint wrote 7 lines
On 9/23/2018 11:38 AM, Marcos Douglas B. Santos via Lazarus wrote: > On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus > wrote: >> (I guess everyone now guessed, I don't u > I thought that I was the last one not using a docked IDE :) Docked IDE (unless the term is used differently from how I understand it) doesn't make much sense if you have a multi-screen setup, IMHO...

It does if the second screen is not mainly for development. E.g. I myself use both Lazarus and Visual Studio on my primary monitor while I have the browser open on the other. And sometimes if I need to look at two documents at once I can open a new editor window in both IDEs and move it to the second screen to better compare them or whatever I need to do. :)

Regards,
Sven

Reply by email

Ralf Quint
to Sven Barth
Sven Barth wrote 14 lines
Am 24.09.2018 um 02:42 schrieb Ralf Quint via Lazarus: > On 9/23/2018 11:38 AM, Marcos Douglas B. Santos via Lazarus wrote: >> On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus >> wrote: >>> (I guess everyone now guessed, I don't u >> I thought that I was the last one not using a docked IDE :) > Docked IDE (unless the term is used differently from how I understand > it) doesn't make much sense if you have a multi-screen setup, IMHO... It does if the second screen is not mainly for development. E.g. I myself use both Lazarus and Visual Studio on my primary monitor while I have the browser open on the other. And sometimes if I need to look at two documents at once I can open a new editor window in both IDEs and move it to the second screen to better compare them or whatever I need to do. :)

Well, I just like to move the separate windows across the screens, basic IDE with project info on the default screen, usually the debugging.messaging stuff on it as well, and the editor windows on the second one. For a time, I even had a 3 screen setup, with the application output (or research browser, depending on the development stage) on the third screen...

Ralf

---
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email

Mattias Gaertner
to Ralf Quint: Docked IDE (unless the term is used differently from how I understand it) doesn't make…
Show quoted text 7 lines
On 9/23/2018 11:38 AM, Marcos Douglas B. Santos via Lazarus wrote: > On Sun, Sep 23, 2018 at 2:28 PM Michael Van Canneyt via Lazarus > wrote: >> (I guess everyone now guessed, I don't u > I thought that I was the last one not using a docked IDE :) Docked IDE (unless the term is used differently from how I understand it) doesn't make much sense if you have a multi-screen setup, IMHO...

Docked SDI.

Docked means you can attach windows together. You can still distribute windows over various screens.

Mattias

Reply by email

Juha Manninen
to Mattias Gaertner

Tested IDE Spotter on Linux / GTK2.
Looks promising although it leaks memory.

Regards,
Juha

---
Heap dump by heaptrc unit
4466835 memory blocks allocated : 800495659/813452344 4464534 memory blocks freed : 800391839/813341848 2301 unfreed memory blocks : 103820
True heap size : 4259840
True free heap : 3778816
Should be : 3854816
Call trace for block $00007F710BF15940 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F
$00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas
Call trace for block $00007F712645C680 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F
$00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas
Call trace for block $00007F712645C800 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F
$00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas
Call trace for block $00007F712645C8C0 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F
$00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas
Call trace for block $00007F712645B300 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F
$00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas
Call trace for block $00007F712645CD40 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F
$00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas
Call trace for block $00007F712645A7C0 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F
$00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas
Call trace for block $00007F712645CF80 size 20
$00000000013CB5CC line 179 of frmspotter.pas
$0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc

Reply by email

Michael Van Canneyt
to Juha Manninen
Juha Manninen wrote
Tested IDE Spotter on Linux / GTK2. Looks promising although it leaks memory.

Hm. How to fix this ? because line 179 is:

if SpotterForm=Nil then
   begin
   SpotterForm:=TSpotterForm.Create(Application);

The form is owned by the TApplication instance. If the application is freed, the form should also be freed. That's TComponent 101...

From your stack trace, it would seem that the form is created multiple

times, which is also strange, since it's a singleton pattern.

The form is set to do coHide on close, so it should not be freed on close.

Michael.

Show quoted text 85 lines
Regards, Juha --- Heap dump by heaptrc unit 4466835 memory blocks allocated : 800495659/813452344 4464534 memory blocks freed : 800391839/813341848 2301 unfreed memory blocks : 103820 True heap size : 4259840 True free heap : 3778816 Should be : 3854816 Call trace for block $00007F710BF15940 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645C680 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645C800 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645C8C0 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645B300 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645CD40 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645A7C0 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc $0000000000431B9F $00000000005D8DD7 line 5425 of include/wincontrol.inc $0000000000667557 line 528 of include/customedit.inc $000000000082BCE0 line 112 of lclmessageglue.pas Call trace for block $00007F712645CF80 size 20 $00000000013CB5CC line 179 of frmspotter.pas $0000000000667CE0 line 652 of include/customedit.inc $0000000000667C5A line 644 of include/customedit.inc $00000000005E7E74 line 1203 of include/control.inc -- _______________________________________________ Lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

Michael Van Canneyt
to Michael Van Canneyt

The stack trace is highly misleading.

I applied a possible fix; Please test and report.

Michael.

Michael Van Canneyt wrote 114 lines
On Mon, 24 Sep 2018, Juha Manninen via Lazarus wrote: > Tested IDE Spotter on Linux / GTK2. > Looks promising although it leaks memory. Hm. How to fix this ? because line 179 is: if SpotterForm=Nil then begin SpotterForm:=TSpotterForm.Create(Application); The form is owned by the TApplication instance. If the application is freed, the form should also be freed. That's TComponent 101... From your stack trace, it would seem that the form is created multiple times, which is also strange, since it's a singleton pattern. The form is set to do coHide on close, so it should not be freed on close. Michael. > > Regards, > Juha > > --- > Heap dump by heaptrc unit > 4466835 memory blocks allocated : 800495659/813452344 > 4464534 memory blocks freed : 800391839/813341848 > 2301 unfreed memory blocks : 103820 > True heap size : 4259840 > True free heap : 3778816 > Should be : 3854816 > Call trace for block $00007F710BF15940 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645C680 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645C800 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645C8C0 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645B300 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645CD40 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645A7C0 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > $0000000000431B9F > $00000000005D8DD7 line 5425 of include/wincontrol.inc > $0000000000667557 line 528 of include/customedit.inc > $000000000082BCE0 line 112 of lclmessageglue.pas > Call trace for block $00007F712645CF80 size 20 > $00000000013CB5CC line 179 of frmspotter.pas > $0000000000667CE0 line 652 of include/customedit.inc > $0000000000667C5A line 644 of include/customedit.inc > $00000000005E7E74 line 1203 of include/control.inc > -- > _______________________________________________ > Lazarus mailing list > > https://lists.lazarus-ide.org/listinfo/lazarus -- _______________________________________________ Lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

R0b0t1
to Michael Van Canneyt: I've polished something that was started during the Lazarus Pro conference in Bonn the…
Michael Van Canneyt wrote 32 lines
Hello, I've polished something that was started during the Lazarus Pro conference in Bonn the last days, the IDE Spotter (this is a "Working Title"). The idea is to have a command box such as it exists in Atom or Visual code studio. Press ALt-Shift-P (or Meta-Shift-P on Mac) to access it. Type the command you wish (e.g. open), navigate with arrows or click on the correct match. The command will be executed. You can type multiple words. all parts must be matched (and are colorized). You can find the package under 'components/idespotter' in SVN. It should also work under 1.8.4/2.0rc1 for those that want to try it. There are some options under Tools - Options - Environment - IDE Spotter. Ideas for improvements are currently: - Shrink window list if the match list is "small". - Search in recent files (projects/units/packages) - ... ? Please testdrive it. Ideas for improvements/comments/bugreports welcome (well, the latter not so much ;)). Thanks go to James Ralston for pitching the idea, and Mattias for including it in SVN ! Michael.

This is a great idea. My window manager, i3, works very well with a feature like this. Sadly a lot of actions are application specific and require that specific application to support "hinting" (to work with a general solution) or to implement their own solution.

You may want to look at https://pwmt.org/projects/girara/, which provides a vim-like input for an application. It finds use in Zathura (PDF reader) and Jumanji (browser, not usable iirc).

Cheers,
R0b0t1

Reply by email

Michael Van Canneyt
to Juha Manninen
Juha Manninen wrote 5 lines
On Mon, Sep 24, 2018 at 11:51 AM Michael Van Canneyt via Lazarus wrote: > I applied a possible fix; Please test and report. The Subversion server and bug tracker are down. I will try later again.

They work here ?

Michael.

Reply by email

Michael Van Canneyt
to AlexeyT: 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves in listbox.…
AlexeyT wrote
1- If i hold Up/Down key (edit is focused), i dont get many up/down moves in listbox. (only one move. Ubuntu 18 gtk2).

Don't keep it pressed. press multiple times.

2- colors (red, green) are configurable?

Yes. See "Tools - Options - Environment - IDE Spotter".

This is actually documented in the Readme.txt file of the package.

The readme.txt is mandatory for lazarus packages.
Seems like a waste of effort :(

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt: Don't keep it pressed. press multiple times. Yes. See "Tools - Options - Environment -…
Show quoted text 11 lines
On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > 1- If i hold Up/Down key (edit is focused), i dont get many up/down > moves in listbox. > (only one move. Ubuntu 18 gtk2). Don't keep it pressed. press multiple times. > 2- colors (red, green) are configurable? Yes. See "Tools - Options - Environment - IDE Spotter".

Maybe add a small button for settings.

This is actually documented in the Readme.txt file of the package. The readme.txt is mandatory for lazarus packages. Seems like a waste of effort :(

The readme.txt is for those browsing the folders, while the description in the lpk is for those installing a package. It's ok to use a short description and then point to the full description - location of your choice.
And you can add a help button for users.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 16 lines
On Mon, 24 Sep 2018 15:00:59 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: > On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > > > 1- If i hold Up/Down key (edit is focused), i dont get many up/down > > moves in listbox. > > (only one move. Ubuntu 18 gtk2). > > Don't keep it pressed. press multiple times. > > > 2- colors (red, green) are configurable? > > Yes. See "Tools - Options - Environment - IDE Spotter". Maybe add a small button for settings.

OK. How to open the settings dialog on a particular tab ?

Show quoted text 9 lines
> This is actually documented in the Readme.txt file of the package. > > The readme.txt is mandatory for lazarus packages. > Seems like a waste of effort :( The readme.txt is for those browsing the folders, while the description in the lpk is for those installing a package.

The readme.txt is contained in the package files.
So you can see it in the list. This seems kind of redundant.

But I have referred to the readme in the description... Small effort after all.

It's ok to use a short description and then point to the full description - location of your choice. And you can add a help button for users.

Nono, I think the window should be as minimalistic as possible.

I even think the settings button is already a violation of my almost non-existing esthetic feelings... :)

Michael.

Reply by email

Michael Van Canneyt
AlexeyT wrote 5 lines
> 3- input (edit) is not autosized, so height is small on Ubuntu. > > So ? better set AutoSize=true, so height will be native. (1.3x bigger.)

Done.

Originally there were some resizing problems. At some point I indeed disabled AutoSize, because the effect of AutoSize for an edit is totally unclear to me.

Michael.

Reply by email

AlexeyT

1- better use default color purple (or dark blue, Navy) instead of red.

2- w/o opened source editor, spotter don't called by hotkey. instead Project mainmenu pops up.

Regards, Alexey

Reply by email

Michael Van Canneyt
to AlexeyT: Sublime Text and CudaText and Atom: name is Command Palette, better use this. Alexey
AlexeyT wrote
On 24.09.2018 13:26, R0b0t1 via Lazarus wrote: > IDE Spotter (this is a "Working Title"). Sublime Text and CudaText and Atom: name is Command Palette, better use this.

Originally I did exactly that. But Mattias wanted a more catchy name.

We still plan to add search in recent items, in which case it will be more than just commands...

Michael.

Reply by email

AlexeyT

3- better add inner (inside listbox) left indent of text: 3-4pix.

4- right indent is too big (15-20pix even with scrollbar), use same 3-4pix as left (considering scrollbar)

Regards, Alexey

Reply by email

Michael Van Canneyt
to AlexeyT
AlexeyT wrote
3- better add inner (inside listbox) left indent of text: 3-4pix.

Will do.

4- right indent is too big (15-20pix even with scrollbar), use same 3-4pix as left (considering scrollbar)

Currently, the scroll bar width as reported is always used as indent, plus The 'W' width. Without it, the shortcut key was never drawn correctly.

How do I know if the scrollbar is visible ?

Michael.

Reply by email

Michael Van Canneyt
AlexeyT wrote 5 lines
> > How do I know if the scrollbar is visible ? TListbox.ClientWidth gives width considering scrollbar.

OK, thank you.
But should not the Rect in the ListBox OnDrawItem already take this into account ?

Michael.

Reply by email

Vojtěch Čihák

TEdit.Autosize does autosizing of edit's Height to its Font (mainly font.size or font.height). It does not affect edit's Width. V.

Reply by email

Mattias Gaertner
to Michael Van Canneyt: OK. How to open the settings dialog on a particular tab ? The readme.txt is contained in…
[...] > Maybe add a small button for settings. OK. How to open the settings dialog on a particular tab ?
Something like this
LazarusIDE.DoOpenIDEOptions(TYourIDEOptionsFrame);
Show quoted text 10 lines
>> This is actually documented in the Readme.txt file of the package. >> >> The readme.txt is mandatory for lazarus packages. >> Seems like a waste of effort :( > > The readme.txt is for those browsing the folders, while the description > in the lpk is for those installing a package. The readme.txt is contained in the package files. So you can see it in the list. This seems kind of redundant.

There are multiple entry points to find your help, yes.

But I have referred to the readme in the description... Small effort after all.

:)

Mattias

Reply by email

Unknown author
to Michael Van Canneyt: Don't keep it pressed. press multiple times. Yes. See "Tools - Options - Environment -…
Michael Van Canneyt wrote 5 lines
On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves > in listbox. (only one move. Ubuntu 18 gtk2). > Don't keep it pressed. press multiple times.

auto-key-repeat is ignored?

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.*

Reply by email

Michael Van Canneyt
to Unknown author
wkitty42--- wrote 9 lines
On 09/24/2018 09:00 AM, Michael Van Canneyt via Lazarus wrote: > On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > >> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves >> in listbox. (only one move. Ubuntu 18 gtk2). > > Don't keep it pressed. press multiple times. auto-key-repeat is ignored?

I don't know what messages are sent when the key is held down. I assume when you keep the key down, only key-down messages are sent. At this moment, the key-up event is used. I will investigate it.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 13 lines
On Mon, 24 Sep 2018, wkitty42--- via Lazarus wrote: > On 09/24/2018 09:00 AM, Michael Van Canneyt via Lazarus wrote: >> On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: >> >>> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves >>> in listbox. (only one move. Ubuntu 18 gtk2). > >> Don't keep it pressed. press multiple times. > > > auto-key-repeat is ignored? I don't know what messages are sent when the key is held down.

KeyPress

I assume when you keep the key down, only key-down messages are sent. At this moment, the key-up event is used. I will investigate it.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
On Tue, 25 Sep 2018 07:54:44 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: > On Mon, 24 Sep 2018, wkitty42--- via Lazarus wrote: > > > On 09/24/2018 09:00 AM, Michael Van Canneyt via Lazarus wrote: > >> On Mon, 24 Sep 2018, AlexeyT via Lazarus wrote: > >> > >>> 1- If i hold Up/Down key (edit is focused), i dont get many up/down moves > >>> in listbox. (only one move. Ubuntu 18 gtk2). > > >> Don't keep it pressed. press multiple times. > > > > > > auto-key-repeat is ignored? > > I don't know what messages are sent when the key is held down. KeyPress

I doubt that.

procedure TSpotterForm.ESearchKeyPress(Sender: TObject; var Key: char);

This signature cannot handle an arrow key or shift state. Those are only available in key down/up events.

Michael.

Reply by email

Michael Van Canneyt
AlexeyT wrote 5 lines
> > How do I know if the scrollbar is visible ? TListbox.ClientWidth gives width considering scrollbar.

I committed a new version with some visual improvements and bugfixes:

* Actually load saved options on startup :)
* Button to go to settings
* Margins around controls
* Better Left and right margin inside listbox
* Use different default colors (maroon, navy)
* Handle keydown instead of key up, so repeat is enabled...

Michael.

Reply by email

Howard Page-Clark
to Michael Van Canneyt
Michael Van Canneyt wrote 20 lines
On Mon, 24 Sep 2018, AlexeyT wrote: > >> >> How do I know if the scrollbar is visible ? > > TListbox.ClientWidth gives width considering scrollbar. I committed a new version with some visual improvements and bugfixes: * Actually load saved options on startup :) * Button to go to settings * Margins around controls * Better Left and right margin inside listbox * Use different default colors (maroon, navy) * Handle keydown instead of key up, so repeat is enabled... Michael.

A further issue: Spotter appears not to know about menu items added by some packages.

For instance, LazProfiler adds three new menu items to the IDE, but Spotter does not list them.

Howard

Reply by email

Michael Van Canneyt
to Howard Page-Clark
Howard Page-Clark wrote 27 lines
On 25/09/18 09:07, Michael Van Canneyt via Lazarus wrote: > > > On Mon, 24 Sep 2018, AlexeyT wrote: > >> >>> >>> How do I know if the scrollbar is visible ? >> >> TListbox.ClientWidth gives width considering scrollbar. > > I committed a new version with some visual improvements and bugfixes: > > * Actually load saved options on startup :) > * Button to go to settings > * Margins around controls > * Better Left and right margin inside listbox > * Use different default colors (maroon, navy) > * Handle keydown instead of key up, so repeat is enabled... > > Michael. A further issue: Spotter appears not to know about menu items added by some packages. For instance, LazProfiler adds three new menu items to the IDE, but Spotter does not list them.

I don't know how lazprofiler installs itself, so I can't comment.

But in general, I suppose that is possible. It only lists available commands. If a package installs a menu item without a command, then it will not be visible in the spotter...

See it as an incentive for package maintainers to install commands instead of simply menu items : I can imagine that installing commands also makes them available for e.g. the editor toolbar.

But I suppose some lazarus dev needs to comment on the exact inner workings.

Michael.

Reply by email

FTurtle
to Michael Van Canneyt: I committed a new version with some visual improvements and bugfixes: * Actually load…
Show quoted text 9 lines
I committed a new version with some visual improvements and bugfixes: * Actually load saved options on startup :) * Button to go to settings * Margins around controls * Better Left and right margin inside listbox * Use different default colors (maroon, navy) * Handle keydown instead of key up, so repeat is enabled...

1. Standard for margins around controls in Lazarus is 6 pixels. Now is lesser. This is very noticeable visually.

2. Spotter does not respect IDE option "Prefer double-click over single-click". It is very uncomfortable for people who prefer double click in lists.

FTurtle -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180925/c54cd3da/attachment.html>

Reply by email

Michael Van Canneyt
to FTurtle
FTurtle wrote 12 lines
> I committed a new version with some visual improvements and bugfixes: > > * Actually load saved options on startup :) > * Button to go to settings > * Margins around controls > * Better Left and right margin inside listbox > * Use different default colors (maroon, navy) > * Handle keydown instead of key up, so repeat is enabled... > 1. Standard for margins around controls in Lazarus is 6 pixels. Now is lesser. This is very noticeable visually.

Really ? You must have 100/10 vision. I don't see any difference.

But I can say with certainty the IDE is not consistent in this regard, e.g. the project inspector uses different spacing than the IDE Options dialog. The only reason I saw that is because of your remark I started putting things side by side.

2. Spotter does not respect IDE option "Prefer double-click over single-click". It is very uncomfortable for people who prefer double click in lists.

Really ? I did not know all these things.

The single click was chosen because this is how it works in Atom.

Where are all these options or rules described ?

Because the IDE Tools - Options page does not contain such a setting. Or at least, I didn't find it.

If I select something, it's always single click.
Project inspector, IDE Tools - Options treeview. Everywhere.

Michael.

Reply by email

FTurtle
to Michael Van Canneyt
Show quoted text 8 lines
> 1. Standard for margins around controls in Lazarus is 6 pixels. Now is lesser. This is very noticeable visually. Really ? You must have 100/10 vision. I don't see any difference. But I can say with certainty the IDE is not consistent in this regard, e.g. the project inspector uses different spacing than the IDE Options dialog. The only reason I saw that is because of your remark I started putting things side by side.

Read wiki:
http://wiki.lazarus.freepascal.org/GUI_design_guidelines#Spacings_and_sizes

"Spacing between elements: 6 pixels."

Show quoted text 10 lines
> 2. Spotter does not respect IDE option "Prefer double-click over single-click". It is very uncomfortable for people who prefer double click in lists. Really ? I did not know all these things. The single click was chosen because this is how it works in Atom. Where are all these options or rules described ? Because the IDE Tools - Options page does not contain such a setting. Or at least, I didn't find it.

Don't forget about filter. Just insert "do".
It placed here:
Tools/Options/Environment/General/Section "Mouse Action", Checkbox "Prefer double-click over single-click".

If I select something, it's always single click. Project inspector, IDE Tools - Options treeview. Everywhere.

This option has an impact, in particular, on "Search results" form, "ToDo List" and etc. 

FTurtle -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180925/856b29e1/attachment.html>

Reply by email

FTurtle
to FTurtle
Show quoted text 5 lines
Read wiki: http://wiki.lazarus.freepascal.org/GUI_design_guidelines#Spacings_and_sizes "Spacing between elements: 6 pixels."

More suitable quote from wiki:
http://wiki.lazarus.freepascal.org/GUI_design_guidelines#BorderSpacing  

"A typical borderspacing of 6 pixels around a component is used."

FTurtle -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180926/5ffba6ae/attachment-0001.html>

Reply by email

Michael Van Canneyt
to FTurtle: Read wiki: http://wiki.lazarus.freepascal.org/GUI_design_guidelines#Spacings_and_sizes…
FTurtle wrote 9 lines
> The single click was chosen because this is how it works in Atom. > > Where are all these options or rules described ? > > Because the IDE Tools - Options page does not contain such a setting. > Or at least, I didn't find it. Don't forget about filter. Just insert "do". It placed here: Tools/Options/Environment/General/Section "Mouse Action", Checkbox "Prefer double-click over single-click".

I already found it.
It's not available in packages, only forms internal to the IDE can access this setting.

> If I select something, it's always single click. > Project inspector, IDE Tools - Options treeview. Everywhere. This option has an impact, in particular, on "Search results" form, "ToDo List" and etc. 

I discussed this with Mattias.
While the option you mention is useful for the windows you mention, We think the IDE spotter is more like a dropdown in functionality. So single click.

But I will change the spacing.

Michael.

Reply by email