mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 15:20:49 +02:00
MG: fixed finding class parts with empty sections
git-svn-id: trunk@1495 -
This commit is contained in:
parent
7be6c70b19
commit
2c995dc597
@ -833,7 +833,7 @@ writeln('TCodeCompletionCodeTool.CreateMissingProcBodies Gather existing method
|
|||||||
// gather existing class proc definitions
|
// gather existing class proc definitions
|
||||||
ClassProcs:=GatherProcNodes(StartNode,[phpInUpperCase,phpAddClassName],
|
ClassProcs:=GatherProcNodes(StartNode,[phpInUpperCase,phpAddClassName],
|
||||||
ExtractClassName(ClassNode,true));
|
ExtractClassName(ClassNode,true));
|
||||||
|
|
||||||
// check for double defined methods in ClassProcs
|
// check for double defined methods in ClassProcs
|
||||||
AnAVLNode:=ClassProcs.FindLowest;
|
AnAVLNode:=ClassProcs.FindLowest;
|
||||||
while AnAVLNode<>nil do begin
|
while AnAVLNode<>nil do begin
|
||||||
|
@ -526,12 +526,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// next node
|
// next node
|
||||||
if (ANode.NextBrother=nil) and (ANode.Parent<>nil)
|
if ANode.NextBrother<>nil then begin
|
||||||
and (ANode.Parent.NextBrother<>nil)
|
|
||||||
and (ANode.Parent.Desc in (AllCodeSections+AllClassSections)) then
|
|
||||||
ANode:=ANode.Parent.NextBrother.FirstChild
|
|
||||||
else
|
|
||||||
ANode:=ANode.NextBrother;
|
ANode:=ANode.NextBrother;
|
||||||
|
end else begin
|
||||||
|
ANode:=ANode.Parent.NextBrother;
|
||||||
|
while (ANode<>nil) and (ANode.Desc in (AllCodeSections+AllClassSections))
|
||||||
|
and (ANode.FirstChild=nil) do
|
||||||
|
ANode:=ANode.NextBrother;
|
||||||
|
if ANode<>nil then ANode:=ANode.FirstChild;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user