mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 21:59:30 +01:00
codetools: class completion: fixed gather proc definitions
git-svn-id: trunk@36890 -
This commit is contained in:
parent
4693905f72
commit
a7e8b21e34
@ -786,17 +786,12 @@ var CurProcName: string;
|
|||||||
NewNodeExt: TCodeTreeNodeExtension;
|
NewNodeExt: TCodeTreeNodeExtension;
|
||||||
cmp: boolean;
|
cmp: boolean;
|
||||||
CurClassName: String;
|
CurClassName: String;
|
||||||
LastNode: TCodeTreeNode;
|
|
||||||
begin
|
begin
|
||||||
//debugln(['TMethodJumpingCodeTool.GatherProcNodes START']);
|
//debugln(['TMethodJumpingCodeTool.GatherProcNodes START']);
|
||||||
Result:=TAVLTree.Create(@CompareCodeTreeNodeExt);
|
Result:=TAVLTree.Create(@CompareCodeTreeNodeExt);
|
||||||
if (StartNode=nil) or (StartNode.Parent=nil) then exit;
|
if (StartNode=nil) or (StartNode.Parent=nil) then exit;
|
||||||
ANode:=StartNode;
|
ANode:=StartNode;
|
||||||
LastNode:=ANode.Parent;
|
while (ANode<>nil) do begin
|
||||||
while LastNode.Desc in AllClassSections do
|
|
||||||
LastNode:=LastNode.Parent;
|
|
||||||
LastNode:=LastNode.NextSkipChilds;
|
|
||||||
while (ANode<>LastNode) do begin
|
|
||||||
//debugln(['TMethodJumpingCodeTool.GatherProcNodes ',ANode.DescAsString]);
|
//debugln(['TMethodJumpingCodeTool.GatherProcNodes ',ANode.DescAsString]);
|
||||||
if ANode.Desc=ctnProcedure then begin
|
if ANode.Desc=ctnProcedure then begin
|
||||||
if (not ((phpIgnoreForwards in Attr)
|
if (not ((phpIgnoreForwards in Attr)
|
||||||
@ -836,10 +831,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// next node
|
// next node
|
||||||
if ANode.Desc in AllClassSections then
|
if (ANode.FirstChild<>nil)
|
||||||
ANode:=ANode.Next
|
and (ANode.Desc in (AllClassSections+[ctnImplementation])) then
|
||||||
else
|
ANode:=ANode.FirstChild
|
||||||
ANode:=ANode.NextSkipChilds;
|
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;
|
end;
|
||||||
//debugln(['TMethodJumpingCodeTool.GatherProcNodes END']);
|
//debugln(['TMethodJumpingCodeTool.GatherProcNodes END']);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -992,7 +992,7 @@ var i, j, FilenameEndPos: integer;
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
DoAddFilteredLine(copy(s,OldStart,length(s)));
|
DoAddFilteredLine(copy(s,OldStart,length(s)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ example:
|
{ example:
|
||||||
Recompiling GtkInt, checksum changed for gdk2x
|
Recompiling GtkInt, checksum changed for gdk2x
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user