From 44e40b779d50e5e9875418fddb8a2aece9b64a2e Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 11 Feb 2016 11:41:40 +0000 Subject: [PATCH] IDE: code help: if ndoe in include file show link to unit git-svn-id: trunk@51596 - --- ide/codehelp.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ide/codehelp.pas b/ide/codehelp.pas index dc9e7415b5..b2f6aa4498 100644 --- a/ide/codehelp.pas +++ b/ide/codehelp.pas @@ -2559,6 +2559,7 @@ begin finally ElementNames.Free; FreeListOfPCodeXYPosition(ListOfPCodeXYPosition); + // Add package name s:=OwnerToFPDocHint(AnOwner); if s<>'' then @@ -2674,6 +2675,13 @@ begin Tool.CleanPosToCaret(Tool.Tree.Root.StartPos,XYPos); end; Result:=Result+' '+SourcePosToFPDocHint(XYPos)+LineEnding; + + if (XYPos.Code<>nil) and (CompareFilenames(Tool.MainFilename,XYPos.Code.Filename)<>0) + then begin + // node in include file => show link to unit + Result:=Result+'
unit '+SourcePosToFPDocHint(Tool.MainFilename,1,1,Tool.GetSourceName)+LineEnding; + end; + Result:=Result+''+LineEnding; end;