codetools: examples: fixed finddeclaration

git-svn-id: trunk@56267 -
This commit is contained in:
mattias 2017-11-03 22:38:40 +00:00
parent 9d8b18caee
commit 0813733813

View File

@ -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