mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:39:31 +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;
|
||||
Code: TCodeBuffer;
|
||||
X: Integer;
|
||||
Y: Integer;
|
||||
Y, BlockTopLine, BlockBottomLine: Integer;
|
||||
Filename: String;
|
||||
Line: String;
|
||||
begin
|
||||
@ -103,7 +103,8 @@ begin
|
||||
writeln('Line ',Y,': ',copy(Line,1,X-1),'|',copy(Line,X,length(Line)));
|
||||
|
||||
// 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
|
||||
writeln('Declaration found: ',NewCode.Filename,' Line=',NewY,' Column=',NewX);
|
||||
end else begin
|
||||
|
Loading…
Reference in New Issue
Block a user