MG: fixed finding class parts with empty sections

git-svn-id: trunk@1495 -
This commit is contained in:
lazarus 2002-03-09 17:13:25 +00:00
parent 7be6c70b19
commit 2c995dc597
2 changed files with 9 additions and 6 deletions

View File

@ -833,7 +833,7 @@ writeln('TCodeCompletionCodeTool.CreateMissingProcBodies Gather existing method
// gather existing class proc definitions
ClassProcs:=GatherProcNodes(StartNode,[phpInUpperCase,phpAddClassName],
ExtractClassName(ClassNode,true));
// check for double defined methods in ClassProcs
AnAVLNode:=ClassProcs.FindLowest;
while AnAVLNode<>nil do begin

View File

@ -526,12 +526,15 @@ begin
end;
end;
// next node
if (ANode.NextBrother=nil) and (ANode.Parent<>nil)
and (ANode.Parent.NextBrother<>nil)
and (ANode.Parent.Desc in (AllCodeSections+AllClassSections)) then
ANode:=ANode.Parent.NextBrother.FirstChild
else
if ANode.NextBrother<>nil then begin
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;