codetools: added FindDeclarationInUsesSection from Darek

git-svn-id: trunk@11242 -
This commit is contained in:
mattias 2007-05-31 17:34:59 +00:00
parent 0154d0a518
commit 8e8e776887

View File

@ -682,6 +682,7 @@ type
function FindDeclarationNodeInInterface(const Identifier: string;
BuildTheTree: Boolean): TCodeTreeNode;
function FindInitializationSection: TCodeTreeNode;
function FindMainUsesSection(UseContainsSection: boolean = false): TCodeTreeNode;
function FindImplementationUsesSection: TCodeTreeNode;
@ -1556,6 +1557,14 @@ begin
if (Result.Desc<>ctnUsesSection) then Result:=nil;
end;
function TFindDeclarationTool.FindInitializationSection: TCodeTreeNode;
begin
Result:=Tree.Root;
if Result=nil then exit;
while (Result<>nil) and (Result.Desc<>ctnInitialization) do
Result:=Result.NextBrother;
end;
function TFindDeclarationTool.FindDeclarationInUsesSection(
UsesNode: TCodeTreeNode; CleanPos: integer;
var NewPos: TCodeXYPosition; var NewTopLine: integer): boolean;