codetools: updated example

git-svn-id: trunk@26382 -
This commit is contained in:
mattias 2010-07-01 09:49:24 +00:00
parent ad941e817a
commit 846ae78bbe
2 changed files with 11 additions and 3 deletions

View File

@ -11,6 +11,9 @@
<TargetFileExt Value=""/>
<Title Value="finddeclaration"/>
</General>
<VersionInfo>
<StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion="0.0.0.0"/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@ -45,10 +48,15 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Version Value="9"/>
<SearchPaths>
<OtherUnitFiles Value="scanexamples/"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>

View File

@ -29,7 +29,7 @@ program RemoveEmptyMethods;
{$mode objfpc}{$H+}
uses
Classes, SysUtils, CodeCache, CodeToolManager, DefineTemplates,
Classes, SysUtils, CodeCache, CodeToolManager, DefineTemplates, FileProcs,
CodeAtom, CodeToolsConfig, CodeToolsStructs, PascalParserTool,
EmptyMethods1;
@ -81,7 +81,7 @@ begin
P:=PCodeXYPosition(ListOfPCodeXYPosition[i]);
writeln(i,' ',DbgsCXY(P^));
end;
if CodeToolBoss.RemoveEmptyMethods(Code,X,Y,Sections,All,[],RemovedProcHeads)
if CodeToolBoss.RemoveEmptyMethods(Code,'',X,Y,Sections,All,[],RemovedProcHeads)
then begin
writeln('Empty methods removed:');
if RemovedProcHeads<>nil then