codetools: FindDeclarationAndOverloads: added option fdlfOneOverloadPerUnit

git-svn-id: trunk@53872 -
This commit is contained in:
mattias 2017-01-03 16:39:30 +00:00
parent baa0147222
commit a330b075c2

View File

@ -650,7 +650,8 @@ type
TFindDeclarationListFlag = (
fdlfWithoutEmptyProperties, // omit properties without type and attributes
fdlfWithoutForwards, // omit foward classes and procedures
fdlfIfStartIsDefinitionStop // omit overloads when start is a definition
fdlfIfStartIsDefinitionStop,// omit overloads when start is a definition
fdlfOneOverloadPerUnit // ignore other overloads of an identifier within the same unit
);
TFindDeclarationListFlags = set of TFindDeclarationListFlag;
@ -5540,6 +5541,16 @@ var
{$ENDIF}
exit;
end;
if (fdlfOneOverloadPerUnit in Flags)
and (NodeList.Count>0)
and (TCodeTreeNode(NodeList[NodeList.Count-1]).GetRoot=NewTool.Tree.Root)
then begin
{$IFDEF VerboseFindDeclarationAndOverload}
debugln(['AddPos skip, because in same unit']);
{$ENDIF}
exit;
end;
NodeList.Add(NewNode);
if (fdlfWithoutEmptyProperties in Flags)
@ -5567,6 +5578,7 @@ var
exit;
end;
end;
AddCodePosition(ListOfPCodeXYPosition,NewPos);
end;