diff --git a/ide/codehelp.pas b/ide/codehelp.pas index dcc074c7cb..2437bc91f6 100644 --- a/ide/codehelp.pas +++ b/ide/codehelp.pas @@ -223,10 +223,10 @@ type ); TCodeHelpHintOption = ( - chhoSmallStep, // do the next step. Use this to run on idle. + chhoSmallStep, // do the next step. Use this to run on idle. chhoDeclarationHeader, // add a header with source position and type of identifier - chhoNoComments, // do not add the pasdoc comments - chhoShowFocusHint // show the shortcut ecFocusHint + chhoComments, // add the pasdoc comments + chhoShowFocusHint // show the shortcut ecFocusHint ); TCodeHelpHintOptions = set of TCodeHelpHintOption; @@ -2581,7 +2581,7 @@ begin end; end; - if not (chhoNoComments in Options) then + if chhoComments in Options then begin // add pasdoc HTMLHint:=HTMLHint+GetPasDocCommentsAsHTML(CTTool,CTNode); diff --git a/ide/fpdochints.pas b/ide/fpdochints.pas index f65463a18c..c8bb001ef1 100644 --- a/ide/fpdochints.pas +++ b/ide/fpdochints.pas @@ -122,7 +122,7 @@ begin and (CodeToolBoss.IdentifierList.StartContextPos.Code<>nil) then begin BaseDir:=CodeToolBoss.IdentifierList.StartContextPos.Code.Filename; HelpResult:=CodeHelpBoss.GetHTMLHintForUnit(Item.Identifier,'',BaseDir, - [chhoDeclarationHeader], + [chhoDeclarationHeader,chhoComments], FBaseURL,FHTMLHint,CacheWasUsed); if HelpResult<>chprSuccess then begin DebugLn(['TFPDocHintProvider.DoUpdateHint FAILED Unit=',Item.Identifier]); @@ -157,7 +157,7 @@ begin end; //DebugLn(['TFPDocHintProvider.DoUpdateHint ',Item.Identifier,' ',Item.Tool.MainFilename,' ',Caret.Code.Filename,' ',Caret.X,',',Caret.Y]); HelpResult:=CodeHelpBoss.GetHTMLHint(Caret.Code,Caret.X,Caret.Y, - [chhoDeclarationHeader], + [chhoDeclarationHeader,chhoComments], FBaseURL,FHTMLHint,PropDetails,CacheWasUsed); if HelpResult<>chprSuccess then begin DebugLn(['TFPDocHintProvider.DoUpdateHint FAILED Identifier=',Item.Identifier]); diff --git a/ide/idehelpmanager.pas b/ide/idehelpmanager.pas index 082c529795..7cba836321 100644 --- a/ide/idehelpmanager.pas +++ b/ide/idehelpmanager.pas @@ -1768,7 +1768,7 @@ begin Code:=CodeToolBoss.LoadFile(ExpandedFilename,true,false); if (Code=nil) or Code.LineColIsSpace(CodePos.Y,CodePos.X) then exit(shrHelpNotFound); - HintFlags:=[chhoDeclarationHeader]; + HintFlags:=[chhoDeclarationHeader,chhoComments]; if ihmchAddFocusHint in Flags then Include(HintFlags,chhoShowFocusHint); if CodeHelpBoss.GetHTMLHint(Code,CodePos.X,CodePos.Y, diff --git a/ide/main.pp b/ide/main.pp index 0474739d6e..1209e72e7f 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -12209,7 +12209,7 @@ begin if (Row <> nil) and FindDeclarationOfOIProperty(OI, Row, Code, Caret, i) then begin - if CodeHelpBoss.GetHTMLHint(Code, Caret.X, Caret.Y, [], + if CodeHelpBoss.GetHTMLHint(Code, Caret.X, Caret.Y, [chhoComments], BaseURL, HtmlHint, PropDetails, CacheWasUsed) <> chprSuccess then begin HtmlHint := '';