codetools: examples: fixed fixfilenames

git-svn-id: trunk@56268 -
This commit is contained in:
mattias 2017-11-03 23:04:28 +00:00
parent 0813733813
commit 46c5ed7280
4 changed files with 5 additions and 17 deletions

1
.gitattributes vendored
View File

@ -830,6 +830,7 @@ components/codetools/examples/scanexamples/genericsexample.pas svneol=native#tex
components/codetools/examples/scanexamples/getcontextexample.pas svneol=native#text/plain
components/codetools/examples/scanexamples/getterexample1.pas svneol=native#text/plain
components/codetools/examples/scanexamples/identcomplexample.pas svneol=native#text/plain
components/codetools/examples/scanexamples/include/BrokenIncFile2.inc svneol=native#text/plain
components/codetools/examples/scanexamples/indentation.pas svneol=native#text/plain
components/codetools/examples/scanexamples/initvars1.pas svneol=native#text/plain
components/codetools/examples/scanexamples/methodjump1.pas svneol=native#text/plain

View File

@ -48,22 +48,11 @@ var
MethodDefinition: String;
CleanMethodDefinition: String;
i: Integer;
Options: TCodeToolsOptions;
begin
// Example: find declaration of 'TObject'
// setup the Options
Options:=TCodeToolsOptions.Create;
// setup your paths
writeln('Config=',ConfigFilename);
if FileExists(ConfigFilename) then begin
// To not parse the FPC sources every time, the options are saved to a file.
Options.LoadFromFile(ConfigFilename);
end;
Options.InitWithEnvironmentVariables;
CodeToolBoss.Init(Options);
// save the options and the FPC unit links results.
Options.SaveToFile(ConfigFilename);
// init the codetools
CodeToolBoss.SimpleInit(ConfigFilename);
// load the file
Filename:=AppendPathDelim(GetCurrentDir)+'scanexamples'+PathDelim
@ -106,8 +95,6 @@ begin
raise Exception.Create('Explore failed');
writeln('Method added: ');
writeln(Code.Source);
Options.Free;
end.

View File

@ -6,7 +6,7 @@ interface
uses
Classes,
cLasses,
CustApp,
biglettersunit, // must be fixed to BigLettersUnit
biglettersunit in 'biglettersunit.pas',// -> BigLettersUnit.pas
@ -19,7 +19,7 @@ uses
{$ENDIF};
{$I BROKENincfiles.inc}// must be fixed to brokenincfiles.inc
{$I ../ScanInstances/BROKENincfile2.inc}// must be fixed to ../scaninstances/brokenincfiles.inc
{$I ../scanexamples/include/BROKENincfile2.inc}// must be fixed to include/BrokenIncFile2.inc
implementation