diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 6355531761..bb54c72b7c 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -1194,7 +1194,7 @@ end; function GatherFilesInFPCSources(Directory: string; const OnProgress: TDefinePoolProgress): TStringList; begin - Result:=GatherFiles(Directory,'{.svn,CVS}', + Result:=GatherFiles(Directory,'{.*,CVS}', '{*.pas,*.pp,*.p,*.inc,Makefile.fpc}',8,OnProgress); end; diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index e69b268673..36b391d453 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -2356,6 +2356,21 @@ end; function TFindDeclarationTool.GetSmartHint(Node: TCodeTreeNode; XYPos: TCodeXYPosition; WithPosition: boolean): string; + + function ReadIdentifierWithDots: String; + begin + Result := ''; + repeat + ReadNextAtom; + Result := Result + GetAtom; + ReadNextAtom; + if CurPos.Flag = cafPoint then + Result := Result + '.' + else + break; + until false; + end; + var IdentNode, TypeNode, ANode: TCodeTreeNode; ClassStr: String; @@ -2539,15 +2554,8 @@ begin // program without source name Result:='program '+ExtractFileNameOnly(MainFilename)+' '; end else begin - Result+=GetAtom+' '; - - if Node.Desc = ctnProperty then begin // add class name - ClassStr := ExtractClassName(Node, False, True); - if ClassStr <> '' then Result += ClassStr + '.'; - end; - - ReadNextAtom; - Result+=GetAtom+' '; + Result+=GetAtom+' '; // keyword + Result := Result + ReadIdentifierWithDots + ' '; end; end; @@ -2556,8 +2564,7 @@ begin // hint for unit in "uses" section Result += 'unit '; MoveCursorToNodeStart(Node); - ReadNextAtom; - Result+=GetAtom; + Result := Result + ReadIdentifierWithDots; end else