Converter + codetools: try to find out why FInterfaceIdentifierCache is Nil sometimes in TFindDeclarationTool.FindIdentifierInInterface.

git-svn-id: trunk@41712 -
This commit is contained in:
juha 2013-06-14 13:45:12 +00:00
parent 70e441594c
commit 673142547e
3 changed files with 13 additions and 0 deletions

View File

@ -6331,6 +6331,8 @@ begin
AVLNode:=FInterfaceIdentifierCache.Items.FindSuccessor(AVLNode);
end;
end else begin
Assert(Assigned(FInterfaceIdentifierCache),
'TFindDeclarationTool.FindIdentifierInInterface: FInterfaceIdentifierCache is not assigned');
CacheEntry:=FInterfaceIdentifierCache.FindIdentifier(Params.Identifier);
if CacheEntry=nil then
exit(false);

View File

@ -1066,6 +1066,8 @@ begin
if not fSettings.SameDfmFile then begin
fSettings.AddLogLine('');
fSettings.AddLogLine(lisConvDelphiRepairingFormFiles);
DebugLn('');
DebugLn('TConvertDelphiProjPack.ConvertAllFormFiles: '+lisConvDelphiRepairingFormFiles);
end;
Screen.Cursor:=crHourGlass;
try
@ -1577,6 +1579,8 @@ begin
try
fSettings.AddLogLine('');
fSettings.AddLogLine(lisConvDelphiFindAllUnitFiles);
DebugLn('');
DebugLn('TConvertDelphiProject.FindAllUnits: '+lisConvDelphiFindAllUnitFiles);
if not CodeToolBoss.FindDelphiProjectUnits(fMainUnitConverter.fPascalBuffer,
FoundUnits, MisUnits, NormalUnits) then
begin
@ -1918,6 +1922,10 @@ begin
MisUnits:=nil;
NormalUnits:=nil;
try
fSettings.AddLogLine('');
fSettings.AddLogLine(lisConvDelphiFindAllUnitFiles);
DebugLn('');
DebugLn('TConvertDelphiPackage.FindAllUnits: '+lisConvDelphiFindAllUnitFiles);
if not CodeToolBoss.FindDelphiPackageUnits(fMainUnitConverter.fPascalBuffer,
FoundUnits, MisUnits, NormalUnits) then
begin

View File

@ -527,6 +527,7 @@ begin
LoopCount:=0; // Prevent possible eternal loops with a counter
repeat
repeat
DebugLn('TLFMFixer.ConvertAndRepair: Checking LFM for '+fPascalBuffer.Filename);
if not fLFMTree.ParseIfNeeded then exit;
if CodeToolBoss.CheckLFM(fPascalBuffer, fLFMBuffer, fLFMTree,
fRootMustBeClassInUnit, fRootMustBeClassInIntf, fObjectsMustExist) then
@ -544,6 +545,8 @@ begin
Result:=mrOk
else begin
Result:=FindAndFixMissingComponentClasses; // Can return mrRetry.
if Result=mrRetry then
DebugLn('TLFMFixer.ConvertAndRepair: Added unit to uses section -> another loop');
end;
Inc(LoopCount); // Increment also in outer loop
until (Result in [mrOK, mrAbort]) or (LoopCount>MaxLoopCount);