lazarus/components/codetools/examples
2021-11-18 22:40:39 +01:00
..
scanexamples codetools: added example FindReferences 2020-04-27 21:08:35 +00:00
.gitignore codetools: fixed parsing sub proc of anonymous proc 2021-11-18 22:40:39 +01:00
addclass.lpi
addclass.lpr
addeventmethod.lpi
addeventmethod.lpr
addfpprofcalls.lpi
addfpprofcalls.lpr
addmethod.lpi
addmethod.lpr
addmethodassign.lpi
addmethodassign.lpr
addwith.lpi
addwith.lpr
autoindent.lpi
autoindent.pas
codecompletion.lpi
codecompletion.lpr
completeabstractmethods.lpi
completeabstractmethods.lpr
completeblock.lpi
completeblock.pas
convert_glib3.sh
finddeclaration.lpi
finddeclaration.lpr
findreferences.lpi codetools: added example FindReferences 2020-04-27 21:08:35 +00:00
findreferences.lpr codetools: added example FindReferences 2020-04-27 21:11:52 +00:00
findunusedunits.lpi
findunusedunits.lpr
findusedunitreferences.lpi
findusedunitreferences.lpr
fixdefinitionorder.lpi
fixdefinitionorder.lpr
fixfilenames.lpi
fixfilenames.pas
fixh2pasdirectives.lpi
fixh2pasdirectives.lpr
getcontext.lpi
getcontext.lpr
getexpandedoperand.lpi
getexpandedoperand.pas
h2pastest.lpi
h2pastest.lpr
identifiercompletion.lpi
identifiercompletion.lpr
initvariable.lpr
listinterfaceclasses.lpi
listinterfaceclasses.pas
methodjumping.lpi
methodjumping.pas
parsefpcmsg.lpi
parsefpcmsg.pas
ppudependencies.lpi
ppudependencies.lpr
proctomethod.lpi
proctomethod.lpr
README.txt
reduceifdefs.lpi
reduceifdefs.lpr
removeemptymethods.lpi
removeemptymethods.lpr
removewith.lpi
removewith.lpr
replaceresourcedirectives.lpi
replaceresourcedirectives.lpr
retypepublishedvars.lpi
retypepublishedvars.lpr
runcfgscript.lpi
runcfgscript.lpr
scanfpcerrormsgfiles.lpi
scanfpcerrormsgfiles.lpr
setincludepath.lpi
setincludepath.pas
sourcecloser.lpi codetools: fixed node start class sections 2019-05-03 08:54:34 +00:00
sourcecloser.lpr codetools: sourcecloser: fixed cleaning up unit begin block 2019-09-13 19:23:20 +00:00
testexpreval.lpi
testexpreval.pas
testfpcsrcunitrules.lpi
testfpcsrcunitrules.lpr Optimize CompareFileExt in different ways. Comparison of FPC/Lazarus generated files can be case-sensitive. 2021-01-10 19:07:52 +00:00
TestNewXMLCfg.lpi
TestNewXMLCfg.lpr
testunitdirectives.lpi
testunitdirectives.lpr
unitdicttest.lpi
unitdicttest.lpr
usedbyunits.lpi
usedbyunits.lpr

Examples for the CodeTools

Some basic examples run out of the box.
Some examples require the path of the FPC sources, which can be given via the
environment variable FPCDIR.
If you see an error message like this:

Scanning FPC sources may take a while ...
TDefinePool.CreateFPCSrcTemplate FPCSrcDir does not exist: ...

Then you must set the FPCDIR variable and start the example again. For example:
Under linux:
  export FPCDIR=/home/username/freepascal/fpc

For instance the FPC 2.4.2 source directory contains the following files:
  compiler
  ide
  installer
  Makefile
  Makefile.fpc
  packages
  rtl
  tests
  utils

See here for more information:
http://wiki.lazarus.freepascal.org/Installing_Lazarus#FPC_Sources

The examples will scan the directories and store the result in a file named
'codetools.config'. So the next time you start any of the examples it does
not need to scan.

List of environment variables:
FPCDIR       = path to FPC source directory
PP           = path of the Free Pascal compiler. For example /usr/bin/ppc386.
LAZARUSDIR   = path of the lazarus sources
FPCTARGET    = FPC target OS like linux, win32, darwin
FPCTARGETCPU = FPC target cpu like i386, x86_64, arm