mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 07:58:16 +02:00
codetools: added FindDeclarationInUsesSection from Darek
git-svn-id: trunk@11242 -
This commit is contained in:
parent
0154d0a518
commit
8e8e776887
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user