mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 13:29:37 +02:00
IDE: Display a HTML hind, even if codetools fails. (for debugger). Issue #40923
This commit is contained in:
parent
ab08a3c959
commit
6e858619fd
@ -311,6 +311,7 @@ type
|
|||||||
function GetElementChain(Code: TCodeBuffer; X, Y: integer; Complete: boolean;
|
function GetElementChain(Code: TCodeBuffer; X, Y: integer; Complete: boolean;
|
||||||
out Chain: TCodeHelpElementChain;
|
out Chain: TCodeHelpElementChain;
|
||||||
out CacheWasUsed: boolean): TCodeHelpParseResult;
|
out CacheWasUsed: boolean): TCodeHelpParseResult;
|
||||||
|
function GetHTMLStub(out BaseURL, HTMLHint: string): TCodeHelpParseResult;
|
||||||
function GetHTMLHint(Code: TCodeBuffer; X, Y: integer; Options: TCodeHelpHintOptions;
|
function GetHTMLHint(Code: TCodeBuffer; X, Y: integer; Options: TCodeHelpHintOptions;
|
||||||
out BaseURL, HTMLHint, PropDetails: string;
|
out BaseURL, HTMLHint, PropDetails: string;
|
||||||
out CacheWasUsed: boolean): TCodeHelpParseResult;
|
out CacheWasUsed: boolean): TCodeHelpParseResult;
|
||||||
@ -2441,6 +2442,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCodeHelpManager.GetHTMLStub(out BaseURL, HTMLHint: string): TCodeHelpParseResult;
|
||||||
|
begin
|
||||||
|
Result:=chprSuccess;
|
||||||
|
BaseURL:='lazdoc://';
|
||||||
|
HTMLHint:='<html><head><link rel="stylesheet" href="lazdoc://lazarus/lazdoc.css" type="text/css">'+LineEnding
|
||||||
|
+'<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>'+LineEnding
|
||||||
|
+'<body>'+ LineEnding
|
||||||
|
+'</body></html>';
|
||||||
|
end;
|
||||||
|
|
||||||
function TCodeHelpManager.GetHTMLHint(Code: TCodeBuffer; X, Y: integer;
|
function TCodeHelpManager.GetHTMLHint(Code: TCodeBuffer; X, Y: integer;
|
||||||
Options: TCodeHelpHintOptions;
|
Options: TCodeHelpHintOptions;
|
||||||
out BaseURL, HTMLHint, PropDetails: string;
|
out BaseURL, HTMLHint, PropDetails: string;
|
||||||
|
@ -11698,6 +11698,8 @@ begin
|
|||||||
HasHint:=true;
|
HasHint:=true;
|
||||||
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.SrcNotebookShowHintForSource B');{$ENDIF}
|
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.SrcNotebookShowHintForSource B');{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
if SmartHintStr = '' then
|
||||||
|
CodeHelpBoss.GetHTMLStub(BaseURL, SmartHintStr);
|
||||||
|
|
||||||
if HasHint then
|
if HasHint then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user