mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 00:19:15 +02:00
codetools: examples: fixed fixfilenames
git-svn-id: trunk@56268 -
This commit is contained in:
parent
0813733813
commit
46c5ed7280
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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/getcontextexample.pas svneol=native#text/plain
|
||||||
components/codetools/examples/scanexamples/getterexample1.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/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/indentation.pas svneol=native#text/plain
|
||||||
components/codetools/examples/scanexamples/initvars1.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
|
components/codetools/examples/scanexamples/methodjump1.pas svneol=native#text/plain
|
||||||
|
@ -48,22 +48,11 @@ var
|
|||||||
MethodDefinition: String;
|
MethodDefinition: String;
|
||||||
CleanMethodDefinition: String;
|
CleanMethodDefinition: String;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
Options: TCodeToolsOptions;
|
|
||||||
begin
|
begin
|
||||||
// Example: find declaration of 'TObject'
|
// Example: find declaration of 'TObject'
|
||||||
|
|
||||||
// setup the Options
|
// init the codetools
|
||||||
Options:=TCodeToolsOptions.Create;
|
CodeToolBoss.SimpleInit(ConfigFilename);
|
||||||
// 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);
|
|
||||||
|
|
||||||
// load the file
|
// load the file
|
||||||
Filename:=AppendPathDelim(GetCurrentDir)+'scanexamples'+PathDelim
|
Filename:=AppendPathDelim(GetCurrentDir)+'scanexamples'+PathDelim
|
||||||
@ -106,8 +95,6 @@ begin
|
|||||||
raise Exception.Create('Explore failed');
|
raise Exception.Create('Explore failed');
|
||||||
writeln('Method added: ');
|
writeln('Method added: ');
|
||||||
writeln(Code.Source);
|
writeln(Code.Source);
|
||||||
|
|
||||||
Options.Free;
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ interface
|
|||||||
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes,
|
cLasses,
|
||||||
CustApp,
|
CustApp,
|
||||||
biglettersunit, // must be fixed to BigLettersUnit
|
biglettersunit, // must be fixed to BigLettersUnit
|
||||||
biglettersunit in 'biglettersunit.pas',// -> BigLettersUnit.pas
|
biglettersunit in 'biglettersunit.pas',// -> BigLettersUnit.pas
|
||||||
@ -19,7 +19,7 @@ uses
|
|||||||
{$ENDIF};
|
{$ENDIF};
|
||||||
|
|
||||||
{$I BROKENincfiles.inc}// must be fixed to brokenincfiles.inc
|
{$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
|
implementation
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user