codetools: class completion: fixed gather proc definitions

git-svn-id: trunk@36890 -
This commit is contained in:
mattias 2012-04-17 21:59:06 +00:00
parent 4693905f72
commit a7e8b21e34
2 changed files with 15 additions and 11 deletions

View File

@ -786,17 +786,12 @@ var CurProcName: string;
NewNodeExt: TCodeTreeNodeExtension;
cmp: boolean;
CurClassName: String;
LastNode: TCodeTreeNode;
begin
//debugln(['TMethodJumpingCodeTool.GatherProcNodes START']);
Result:=TAVLTree.Create(@CompareCodeTreeNodeExt);
if (StartNode=nil) or (StartNode.Parent=nil) then exit;
ANode:=StartNode;
LastNode:=ANode.Parent;
while LastNode.Desc in AllClassSections do
LastNode:=LastNode.Parent;
LastNode:=LastNode.NextSkipChilds;
while (ANode<>LastNode) do begin
while (ANode<>nil) do begin
//debugln(['TMethodJumpingCodeTool.GatherProcNodes ',ANode.DescAsString]);
if ANode.Desc=ctnProcedure then begin
if (not ((phpIgnoreForwards in Attr)
@ -836,10 +831,19 @@ begin
end;
end;
// next node
if ANode.Desc in AllClassSections then
ANode:=ANode.Next
else
ANode:=ANode.NextSkipChilds;
if (ANode.FirstChild<>nil)
and (ANode.Desc in (AllClassSections+[ctnImplementation])) then
ANode:=ANode.FirstChild
else begin
while ANode.NextBrother=nil do begin
ANode:=ANode.Parent;
if ANode=nil then break;
if not (ANode.Desc in (AllClassSections+[ctnImplementation])) then
break;
end;
if ANode=nil then break;
ANode:=ANode.NextBrother;
end;
end;
//debugln(['TMethodJumpingCodeTool.GatherProcNodes END']);
end;

View File

@ -992,7 +992,7 @@ var i, j, FilenameEndPos: integer;
Result:=true;
DoAddFilteredLine(copy(s,OldStart,length(s)));
end;
{ example:
Recompiling GtkInt, checksum changed for gdk2x
}