CodeTools: support dotted units when handling uses section. Issue #31539

git-svn-id: trunk@54413 -
This commit is contained in:
ondrej 2017-03-15 21:17:59 +00:00
parent 98f78a3107
commit f04d742869

View File

@ -1409,7 +1409,7 @@ begin
exit;
if fNewMainUsesSectionUnits=nil then
fNewMainUsesSectionUnits:=TAVLTree.Create(TListSortCompare(@CompareIdentifiers));
fNewMainUsesSectionUnits:=TAVLTree.Create(TListSortCompare(@CompareDottedIdentifiers));
//DebugLn(['TCodeCompletionCodeTool.AddNeededUnitToMainUsesSection AnUnitName="',AnUnitName,'"']);
if fNewMainUsesSectionUnits.Find(AnUnitName)<>nil then exit;
s:=GetIdentifier(AnUnitName);
@ -8178,6 +8178,11 @@ begin
ReadNextAtom;
ReadNextAtom;
end;
while AtomIsChar('.') do
begin
ReadNextAtom;
ReadNextAtom;
end;
if AtomIsChar(';') then break;
if not AtomIsChar(',') then break;
until (CurPos.StartPos>SrcLen);;