Sign in Join

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

Mailing lists / lazarus / 2008-10

Extending the editor's hinting functionality

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Tom Verhoeff

I would like to throw up a suggestion for extending the editor's hinting functionality.

We use Lazarus in a first-year introductory programming course. One of the rules in our coding standard is that every variable declaration needs to be accompanied by an explanatory comment.

It would be nice if the editor could show the comment associated with the variable's declaration when you enter/point at an occurrence of that variable.

This resembles the functionality where you get the routine prototype when entering/pointing at a routine invocation.

Of course, this could apply to other names as well (constants, types, routines). In fact, for routines, the prototype only shows you the _syntactic_ specifics of that routine. _Semantic_ specifics are typically addressed in a comment.

It might be necessary to use a special marker (cf. Javadoc) to help the editor recognize such comments-to-be-used-for-hinting.

This functionality would further increase the value of adding comments to definitions and declarations.

By the way, I hired a student (Thorstin Crijns) to do some work on improving Lazarus for educational use. This should benefit all Lazarus users, both aspiring beginners and experienced users.

You'll be hearing more from Thorstin in the future.

I have asked him to start with the built-in help facility and documentation. Other items on the list are the built-in debugger support, and template support. Editor features could be another thing, but he will need more help there.

Best regards,

Tom Verhoeff

E-MAIL: T.Verhoeff @ TUE.NL | Dept. of Math. & Comp. Science PHONE: +31 40 247 41 25 | Technische Universiteit Eindhoven FAX: +31 40 247 54 04 | PO Box 513, NL-5600 MB Eindhoven http://www.win.tue.nl/~wstomv/ | The Netherlands

Reply by email

Reenen Laurie
to Tom Verhoeff

That is an AWESOME idea...

I'd love to have a bit more information that just the syntax, (which doesn't always even fit into the box that pops up) but I don't know how one would modify the pop-up to do it...

Maybe only show the comment once you've settled on a specific command/variable... and then make it popup as a hint?

It would be really cool if it could work for both variables and functions/procedures.

Regards,
-Reenen

Tom Verhoeff wrote 50 lines
I would like to throw up a suggestion for extending the editor's hinting functionality. We use Lazarus in a first-year introductory programming course. One of the rules in our coding standard is that every variable declaration needs to be accompanied by an explanatory comment. It would be nice if the editor could show the comment associated with the variable's declaration when you enter/point at an occurrence of that variable. This resembles the functionality where you get the routine prototype when entering/pointing at a routine invocation. Of course, this could apply to other names as well (constants, types, routines). In fact, for routines, the prototype only shows you the _syntactic_ specifics of that routine. _Semantic_ specifics are typically addressed in a comment. It might be necessary to use a special marker (cf. Javadoc) to help the editor recognize such comments-to-be-used-for-hinting. This functionality would further increase the value of adding comments to definitions and declarations. By the way, I hired a student (Thorstin Crijns) to do some work on improving Lazarus for educational use. This should benefit all Lazarus users, both aspiring beginners and experienced users. You'll be hearing more from Thorstin in the future. I have asked him to start with the built-in help facility and documentation. Other items on the list are the built-in debugger support, and template support. Editor features could be another thing, but he will need more help there. Best regards, Tom Verhoeff -- E-MAIL: T.Verhoeff @ TUE.NL | Dept. of Math. & Comp. Science PHONE: +31 40 247 41 25 | Technische Universiteit Eindhoven FAX: +31 40 247 54 04 | PO Box 513, NL-5600 MB Eindhoven http://www.win.tue.nl/~wstomv/ <http://www.win.tue.nl/%7Ewstomv/> | The Netherlands _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
o__ ,_.>/ _ (_)_\(_)_______ ...speed is good _______________ I believe five out of four people have a problem with fractions. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081002/47f59744/attachment.html

Reply by email

Reenen Laurie
to Mattias Gärtner

I just tested it, and very very cool. You see it by hovering over the selected keyword. Also (dunno if this was fixed earlier) but the little box expands now so you can see the whole syntax.

I don't think there is any other IDE's that does this. Lazarus rocks!

Question:
When adding a comment in the next line... is the < part of the necessary syntax?

Regards,
-Reenen

Mattias G?rtner wrote 63 lines
Zitat von Tom Verhoeff : > I would like to throw up a suggestion for extending the editor's hinting > functionality. > > We use Lazarus in a first-year introductory programming course. > One of the rules in our coding standard is that every variable > declaration needs to be accompanied by an explanatory comment. > > It would be nice if the editor could show the comment associated with the > variable's declaration when you enter/point at an occurrence of that > variable. > > This resembles the functionality where you get the routine prototype > when entering/pointing at a routine invocation. > > Of course, this could apply to other names as well (constants, types, > routines). In fact, for routines, the prototype only shows you the > _syntactic_ specifics of that routine. _Semantic_ specifics are typically > addressed in a comment. > > It might be necessary to use a special marker (cf. Javadoc) to > help the editor recognize such comments-to-be-used-for-hinting. > > This functionality would further increase the value of adding comments > to definitions and declarations. Implemented in svn 16843. For example: var i: integer; // comment starting in same line c: char; {< long comment starting in next line} Comments in front are not yet implemented. > By the way, I hired a student (Thorstin Crijns) to do some work on > improving Lazarus for educational use. This should benefit all Lazarus > users, both aspiring beginners and experienced users. Great. > You'll be hearing more from Thorstin in the future. > > I have asked him to start with the built-in help facility and > documentation. Other items on the list are the built-in debugger support, > and template support. Editor features could be another thing, but he > will need more help there. :) Mattias _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
o__ ,_.>/ _ (_)_\(_)_______ ...speed is good _______________ I believe five out of four people have a problem with fractions. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081002/fed3242c/attachment.html

Reply by email

Mattias Gaertner
to Reenen Laurie
Show quoted text 9 lines
I just tested it, and very very cool. You see it by hovering over the selected keyword. Also (dunno if this was fixed earlier) but the little box expands now so you can see the whole syntax. I don't think there is any other IDE's that does this. Lazarus rocks! Question: When adding a comment in the next line... is the < part of the necessary syntax?

Yes, it is a pasdoc syntax. Otherwise the comment belongs to the following code.

Mattias

Reply by email