mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 20:39:23 +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;
|
function FindDeclarationNodeInInterface(const Identifier: string;
|
||||||
BuildTheTree: Boolean): TCodeTreeNode;
|
BuildTheTree: Boolean): TCodeTreeNode;
|
||||||
|
|
||||||
|
function FindInitializationSection: TCodeTreeNode;
|
||||||
function FindMainUsesSection(UseContainsSection: boolean = false): TCodeTreeNode;
|
function FindMainUsesSection(UseContainsSection: boolean = false): TCodeTreeNode;
|
||||||
function FindImplementationUsesSection: TCodeTreeNode;
|
function FindImplementationUsesSection: TCodeTreeNode;
|
||||||
|
|
||||||
@ -1556,6 +1557,14 @@ begin
|
|||||||
if (Result.Desc<>ctnUsesSection) then Result:=nil;
|
if (Result.Desc<>ctnUsesSection) then Result:=nil;
|
||||||
end;
|
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(
|
function TFindDeclarationTool.FindDeclarationInUsesSection(
|
||||||
UsesNode: TCodeTreeNode; CleanPos: integer;
|
UsesNode: TCodeTreeNode; CleanPos: integer;
|
||||||
var NewPos: TCodeXYPosition; var NewTopLine: integer): boolean;
|
var NewPos: TCodeXYPosition; var NewTopLine: integer): boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user