mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 20:19:16 +02:00
codetools: examples: fixed finddeclaration
git-svn-id: trunk@56267 -
This commit is contained in:
parent
9d8b18caee
commit
0813733813
@ -40,7 +40,7 @@ var
|
|||||||
NewX, NewY, NewTopLine: integer;
|
NewX, NewY, NewTopLine: integer;
|
||||||
Code: TCodeBuffer;
|
Code: TCodeBuffer;
|
||||||
X: Integer;
|
X: Integer;
|
||||||
Y: Integer;
|
Y, BlockTopLine, BlockBottomLine: Integer;
|
||||||
Filename: String;
|
Filename: String;
|
||||||
Line: String;
|
Line: String;
|
||||||
begin
|
begin
|
||||||
@ -103,7 +103,8 @@ begin
|
|||||||
writeln('Line ',Y,': ',copy(Line,1,X-1),'|',copy(Line,X,length(Line)));
|
writeln('Line ',Y,': ',copy(Line,1,X-1),'|',copy(Line,X,length(Line)));
|
||||||
|
|
||||||
// Step 2: find declaration
|
// Step 2: find declaration
|
||||||
if CodeToolBoss.FindDeclaration(Code,X,Y,NewCode,NewX,NewY,NewTopLine) then
|
if CodeToolBoss.FindDeclaration(Code,X,Y,NewCode,NewX,NewY,NewTopLine,
|
||||||
|
BlockTopLine,BlockBottomLine) then
|
||||||
begin
|
begin
|
||||||
writeln('Declaration found: ',NewCode.Filename,' Line=',NewY,' Column=',NewX);
|
writeln('Declaration found: ',NewCode.Filename,' Line=',NewY,' Column=',NewX);
|
||||||
end else begin
|
end else begin
|
||||||
|
Loading…
Reference in New Issue
Block a user