mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 11:39:25 +02:00
codetools: dotted unit names in smart hints, ignore .git dirs in fpc sources
git-svn-id: branches/fixes_1_4@47765 -
This commit is contained in:
parent
b423848636
commit
0243b812ca
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user