codetools: fixed compilation of examples

git-svn-id: trunk@22940 -
This commit is contained in:
mattias 2009-12-03 11:10:47 +00:00
parent 1d47d3d54a
commit 5cdcfd3451
17 changed files with 54 additions and 76 deletions

View File

@ -1,16 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<PublishOptions> <PublishOptions>
@ -51,13 +50,10 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="scanexamples/"/> <OtherUnitFiles Value="scanexamples/"/>
</SearchPaths> </SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@ -1,17 +1,16 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/> <MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<PublishOptions> <PublishOptions>

View File

@ -1,16 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<PublishOptions> <PublishOptions>
@ -41,13 +40,10 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="scanexamples/"/> <OtherUnitFiles Value="scanexamples/"/>
</SearchPaths> </SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@ -45,7 +45,7 @@ begin
if FilenameIsPascalUnit(FileInfo.Name,false) then begin if FilenameIsPascalUnit(FileInfo.Name,false) then begin
List.Add(Dir+FileInfo.Name); List.Add(Dir+FileInfo.Name);
end else if (FileInfo.Attr and faDirectory)>0 then begin end else if (FileInfo.Attr and faDirectory)>0 then begin
CollectUnits(Dir+); CollectUnits(Dir+FileInfo.Name+PathDelim,List);
end; end;
until FindNextUTF8(FileInfo)<>0; until FindNextUTF8(FileInfo)<>0;
end; end;

View File

@ -1,9 +1,11 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>

View File

@ -12,8 +12,8 @@ var
Code: TCodeBuffer; Code: TCodeBuffer;
CodeContexts: TCodeContextInfo; CodeContexts: TCodeContextInfo;
i: Integer; i: Integer;
ExprType: TExpressionType;
Filename: String; Filename: String;
Item: TCodeContextInfoItem;
begin begin
// setup the Options // setup the Options
CodeToolBoss.SimpleInit(ConfigFilename); CodeToolBoss.SimpleInit(ConfigFilename);
@ -31,10 +31,10 @@ begin
begin begin
writeln('Contexts found: Count=',CodeContexts.Count); writeln('Contexts found: Count=',CodeContexts.Count);
for i:=0 to CodeContexts.Count-1 do begin for i:=0 to CodeContexts.Count-1 do begin
ExprType:=CodeContexts[i]; Item:=CodeContexts[i];
write('i=',i,' ',ExprTypeToString(ExprType)); write('i=',i,' ',ExprTypeToString(Item.Expr));
if ExprType.Context.Node<>nil then if Item.Expr.Context.Node<>nil then
write(' ',ExprType.Context.Tool.ExtractNode(ExprType.Context.Node,[])); write(' ',Item.Expr.Context.Tool.ExtractNode(Item.Expr.Context.Node,[]));
writeln; writeln;
end; end;
end else begin end else begin

View File

@ -1,16 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<PublishOptions> <PublishOptions>
@ -45,7 +44,7 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="scanexamples/"/> <OtherUnitFiles Value="scanexamples/"/>
</SearchPaths> </SearchPaths>
@ -56,7 +55,6 @@
<OverflowChecks Value="True"/> <OverflowChecks Value="True"/>
<StackChecks Value="True"/> <StackChecks Value="True"/>
</Checks> </Checks>
<Generate Value="Faster"/>
</CodeGeneration> </CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>

View File

@ -1,12 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="5"/>
<General> <General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<VersionInfo> <VersionInfo>
@ -43,10 +44,7 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@ -1,12 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<PublishOptions> <PublishOptions>

View File

@ -1,12 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<PublishOptions> <PublishOptions>

View File

@ -1,12 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InIDEConfig"/> <SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<VersionInfo> <VersionInfo>
@ -38,10 +39,7 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@ -38,7 +38,7 @@ var
Group: TPPUGroup; Group: TPPUGroup;
i: Integer; i: Integer;
Member: TPPUMember; Member: TPPUMember;
MissingUnit: TStringList; MissingUnit: TStrings;
begin begin
if (Paramcount<1) then begin if (Paramcount<1) then begin
writeln('Usage:'); writeln('Usage:');

View File

@ -1,16 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
</General> </General>
<PublishOptions> <PublishOptions>
@ -41,13 +40,10 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="scanexamples/"/> <OtherUnitFiles Value="scanexamples/"/>
</SearchPaths> </SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@ -1,12 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="finddeclaration"/> <Title Value="finddeclaration"/>
</General> </General>
@ -44,13 +45,10 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="scanexamples/"/> <OtherUnitFiles Value="scanexamples/"/>
</SearchPaths> </SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@ -74,7 +74,7 @@ begin
// complete code // complete code
ListOfPCodeXYPosition:=TFPList.Create; ListOfPCodeXYPosition:=TFPList.Create;
Sections:=[pcsPublished,pcsPrivate,pcsProtected,pcsPublic]; Sections:=[pcsPublished,pcsPrivate,pcsProtected,pcsPublic];
if CodeToolBoss.FindEmptyMethods(Code,X,Y,Sections,ListOfPCodeXYPosition,All) if CodeToolBoss.FindEmptyMethods(Code,'',X,Y,Sections,ListOfPCodeXYPosition,All)
then begin then begin
writeln('Found ',ListOfPCodeXYPosition.Count,' empty methods (All=',All,'):'); writeln('Found ',ListOfPCodeXYPosition.Count,' empty methods (All=',All,'):');
for i:=0 to ListOfPCodeXYPosition.Count-1 do begin for i:=0 to ListOfPCodeXYPosition.Count-1 do begin

View File

@ -1,16 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="reduceifdefs"/> <Title Value="reduceifdefs"/>
</General> </General>
@ -42,13 +41,10 @@
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value="scanexamples/"/> <OtherUnitFiles Value="scanexamples/"/>
</SearchPaths> </SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other> <Other>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@ -1,16 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="7"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="SetIncludePath"/> <Title Value="SetIncludePath"/>
</General> </General>