mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 12:59:14 +02:00
codetools: FindDeclarationAndOverloads: added option fdlfOneOverloadPerUnit
git-svn-id: trunk@53872 -
This commit is contained in:
parent
baa0147222
commit
a330b075c2
@ -650,7 +650,8 @@ type
|
|||||||
TFindDeclarationListFlag = (
|
TFindDeclarationListFlag = (
|
||||||
fdlfWithoutEmptyProperties, // omit properties without type and attributes
|
fdlfWithoutEmptyProperties, // omit properties without type and attributes
|
||||||
fdlfWithoutForwards, // omit foward classes and procedures
|
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;
|
TFindDeclarationListFlags = set of TFindDeclarationListFlag;
|
||||||
|
|
||||||
@ -5540,6 +5541,16 @@ var
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
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);
|
NodeList.Add(NewNode);
|
||||||
|
|
||||||
if (fdlfWithoutEmptyProperties in Flags)
|
if (fdlfWithoutEmptyProperties in Flags)
|
||||||
@ -5567,6 +5578,7 @@ var
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AddCodePosition(ListOfPCodeXYPosition,NewPos);
|
AddCodePosition(ListOfPCodeXYPosition,NewPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user