Recent

Author Topic: [SOLVED] IntelliSense-like feature...  (Read 569 times)

GypsyPrince

  • Guest
[SOLVED] IntelliSense-like feature...
« on: April 07, 2020, 05:57:47 am »
While tinkering earlier today, I accidentally came across what I assume is an intentional feature in Free Pascal.

Consider the following type and constant declarations: Style 1

Code: Pascal  [Select][+][-]
  1.   //{Boole-Logic} Represents an enhanced boolean (True, False, or Neither) value or state...
  2.   Type Boologic = (Nay=-1, Nor=0, Aye=1);
  3.  
  4.  
  5. Const
  6.  
  7.   // Control Characters
  8.   // ----------------------------
  9.   CTL_AKNWLDGMNT : Char = #6;
  10.   CTL_BACKSPACE : Char = #8;
  11.   CTL_BELL : Char = #7;
  12.   CTL_CANCEL : Char = #24;
  13.   CTL_CRGRTRN : Char = #13;

When hovering the mouse over any individual field member, an information window pops up that displays the name of the member, as well as the path to the unit file containing the member - as is shown in image 1.

Now, consider the same type and constant declarations restructured: Style 2

Code: Pascal  [Select][+][-]
  1.   //{Boole-Logic} Represents an enhanced boolean (True, False, or Neither) value or state...
  2.   Type Boologic = (
  3.     Nay=-1, //Boologic; equates to false, no, negative, or off.
  4.     Nor=0,  //Boologic; equates to vague, naught (or nought), neutral, nothing, neither, uninitialized, or undetermined.
  5.     Aye=1   //Boologic; equates to true, yes, positive/affirmative, or on.
  6.   );
  7.  
  8.  
  9. Const
  10.  
  11.   //Control character; acknowledgment.
  12.   CTL_AKNWLDGMNT : Char = #6;
  13.   //Control character; backspace.
  14.   CTL_BACKSPACE : Char = #8;
  15.   //Control character; bell ("ding") sound.
  16.   CTL_BELL : Char = #7;
  17.   //Control character; cancel.
  18.   CTL_CANCEL : Char = #24;
  19.   //Control character; carriage return.
  20.   CTL_CRGRTRN : Char = #13;

When I hover my mouse over a member, its description recorded in the associated comment is now also displayed in the information window - as is shown in image 2.

This seems to be a feature similar to IntelliSense in MS Visual Studio.

Can anyone...
  a. confirm this is an actual feature in Free Pascal/Lazarus?
  b. tell me what the name of this feature is and a link to where I might find it in the documentation?

Thank you.
« Last Edit: April 07, 2020, 06:25:20 am by GypsyPrince »

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: IntelliSense-like feature...
« Reply #1 on: April 07, 2020, 06:05:28 am »
Lazarus has many cool features. You can find many cool tricks here:
https://wiki.lazarus.freepascal.org/New_IDE_features_since

GypsyPrince

  • Guest
Re: IntelliSense-like feature...
« Reply #2 on: April 07, 2020, 06:21:55 am »
@Handoko

Yes, there are some very interesting features described in that link. I need to check more into them.

The feature I stumbled upon seems to fall under the 'fpdoc help inside editor tooltips' section.

Thanks for the helpful info!!

 

TinyPortal © 2005-2018