codetools: fixed example find declaration

git-svn-id: trunk@29401 -
This commit is contained in:
mattias 2011-02-06 11:07:25 +00:00
parent 747167aaed
commit 23861311a1
2 changed files with 7 additions and 5 deletions

View File

@ -29,7 +29,7 @@ program FindDeclaration;
{$mode objfpc}{$H+}
uses
Classes, SysUtils, CodeCache, CodeToolManager, DefineTemplates,
Classes, SysUtils, CodeCache, CodeToolManager, DefineTemplates, FileProcs,
CodeToolsConfig, SimpleUnit1;
const
@ -84,10 +84,10 @@ begin
writeln('FPCDIR=',Options.FPCSrcDir);
writeln('PP=',Options.FPCPath);
writeln('LAZARUSDIR=',Options.LazarusSrcDir);
writeln('TARGET=',Options.TargetOS);
writeln('TARGETCPU=',Options.TargetProcessor);
writeln('FPCTARGET=',Options.TargetOS);
writeln('FPCTARGETCPU=',Options.TargetProcessor);
if (ParamCount>=3) then begin
Options.TestPascalFile:=ExpandFileNameUTF8(ParamStr(1));
Options.TestPascalFile:=CleanAndExpandFilename(ParamStr(1));
X:=StrToInt(ParamStr(2));
Y:=StrToInt(ParamStr(3));
end;
@ -102,7 +102,7 @@ begin
begin
writeln('Declaration found: ',NewCode.Filename,' Line=',NewY,' Column=',NewX);
end else begin
writeln('Declaration not found: ',CodeToolBoss.ErrorMessage);
writeln('Parse error: ',CodeToolBoss.ErrorMessage);
end;
except
on E: Exception do begin

View File

@ -20,6 +20,8 @@ type
function DoSomething(Arg: T1): T2;
function Test(Arg: Intf): Intf;
end;
const
RecLongInt: TRecG<longint> = (F:0);
var
ArraySpecialize: TGenericArray<Integer>;