mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:39:31 +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;
|
||||
out Chain: TCodeHelpElementChain;
|
||||
out CacheWasUsed: boolean): TCodeHelpParseResult;
|
||||
function GetHTMLStub(out BaseURL, HTMLHint: string): TCodeHelpParseResult;
|
||||
function GetHTMLHint(Code: TCodeBuffer; X, Y: integer; Options: TCodeHelpHintOptions;
|
||||
out BaseURL, HTMLHint, PropDetails: string;
|
||||
out CacheWasUsed: boolean): TCodeHelpParseResult;
|
||||
@ -2441,6 +2442,16 @@ begin
|
||||
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;
|
||||
Options: TCodeHelpHintOptions;
|
||||
out BaseURL, HTMLHint, PropDetails: string;
|
||||
|
@ -11698,6 +11698,8 @@ begin
|
||||
HasHint:=true;
|
||||
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.SrcNotebookShowHintForSource B');{$ENDIF}
|
||||
end;
|
||||
if SmartHintStr = '' then
|
||||
CodeHelpBoss.GetHTMLStub(BaseURL, SmartHintStr);
|
||||
|
||||
if HasHint then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user