[Lazarus] "(Source)" in hint boxes

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Tue Jan 7 19:12:03 CET 2014


Martin Frb wrote:
> On 07/01/2014 15:27, Mark Morgan Lloyd wrote:
>> Mark Morgan Lloyd wrote:
>>> Mattias Gaertner wrote:
>>>> On Sun, 05 Jan 2014 10:44:04 +0000
>>>> Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:
>>>>
>>>>> When the mouse is hovered over an identifier, a hint box pops up 
>>>>> showing declaration and associated comment.
>>>>>
>>>>> Where is this implemented?
>>>>
>>>> What do you search: Popup box or content?
>>>
>>> Content I think, but possibly also the popup if this is where final 
>>> formatting is done. What I'm hoping to do is add a flag so that it 
>>> only appears once in each box. Also my understanding (from previous 
>>> discussion which I can't find) is that at present "(Source)" is a 
>>> placeholder for a link so I was thinking about experimenting with a 
>>> slightly more compact bit of Unicode.
>>
>> Does anybody have any thoughts on this please?
>>
> 
> The content, if I get your question right, is provided by codetools, and 
> comes from:
> - Sourcecode
> - comment in source
> - fpdoc
> 
> The formatting, I am not sure, but the final output depends, on if you 
> have IProTurboDsgn installed or not. Though on GTK the IPro can cause 
> crashes.
> 
> for IPro the content is html. Not sure if codetool does that or 
> something else.
> It may be that without IPro the html version is just stripped of the 
> html tags. (not sure)

I don't appear to have turbopoweriprodsgn installed on any systems, and 
removing the turbopoweripro package doesn't appear to change anything.

Possibly

       CommentStr:=ExtractCommentContent(CommentCode.Source,CommentStart,
                                         NestedComments,true,true,true);
       if CommentStr <> '' then
         Result:=Result+'<span class="comment">'+TextToHTML(CommentStr)
           +' ('+SourcePosToFPDocHint(CodeXYPos^,'Source')+')'
           +'</span><br>'+LineEnding;

etc. in ide/codehelp.pas. If so that gives me something to get my teeth 
into.

(* The irritating thing is when a comment has *)
(* been boxed in like this, which results in  *)
(* spurious (Source) markers in the hint.     *)

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list