mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 19:39:30 +02:00
Converter + codetools: try to find out why FInterfaceIdentifierCache is Nil sometimes in TFindDeclarationTool.FindIdentifierInInterface.
git-svn-id: trunk@41712 -
This commit is contained in:
parent
70e441594c
commit
673142547e
@ -6331,6 +6331,8 @@ begin
|
|||||||
AVLNode:=FInterfaceIdentifierCache.Items.FindSuccessor(AVLNode);
|
AVLNode:=FInterfaceIdentifierCache.Items.FindSuccessor(AVLNode);
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
|
Assert(Assigned(FInterfaceIdentifierCache),
|
||||||
|
'TFindDeclarationTool.FindIdentifierInInterface: FInterfaceIdentifierCache is not assigned');
|
||||||
CacheEntry:=FInterfaceIdentifierCache.FindIdentifier(Params.Identifier);
|
CacheEntry:=FInterfaceIdentifierCache.FindIdentifier(Params.Identifier);
|
||||||
if CacheEntry=nil then
|
if CacheEntry=nil then
|
||||||
exit(false);
|
exit(false);
|
||||||
|
@ -1066,6 +1066,8 @@ begin
|
|||||||
if not fSettings.SameDfmFile then begin
|
if not fSettings.SameDfmFile then begin
|
||||||
fSettings.AddLogLine('');
|
fSettings.AddLogLine('');
|
||||||
fSettings.AddLogLine(lisConvDelphiRepairingFormFiles);
|
fSettings.AddLogLine(lisConvDelphiRepairingFormFiles);
|
||||||
|
DebugLn('');
|
||||||
|
DebugLn('TConvertDelphiProjPack.ConvertAllFormFiles: '+lisConvDelphiRepairingFormFiles);
|
||||||
end;
|
end;
|
||||||
Screen.Cursor:=crHourGlass;
|
Screen.Cursor:=crHourGlass;
|
||||||
try
|
try
|
||||||
@ -1577,6 +1579,8 @@ begin
|
|||||||
try
|
try
|
||||||
fSettings.AddLogLine('');
|
fSettings.AddLogLine('');
|
||||||
fSettings.AddLogLine(lisConvDelphiFindAllUnitFiles);
|
fSettings.AddLogLine(lisConvDelphiFindAllUnitFiles);
|
||||||
|
DebugLn('');
|
||||||
|
DebugLn('TConvertDelphiProject.FindAllUnits: '+lisConvDelphiFindAllUnitFiles);
|
||||||
if not CodeToolBoss.FindDelphiProjectUnits(fMainUnitConverter.fPascalBuffer,
|
if not CodeToolBoss.FindDelphiProjectUnits(fMainUnitConverter.fPascalBuffer,
|
||||||
FoundUnits, MisUnits, NormalUnits) then
|
FoundUnits, MisUnits, NormalUnits) then
|
||||||
begin
|
begin
|
||||||
@ -1918,6 +1922,10 @@ begin
|
|||||||
MisUnits:=nil;
|
MisUnits:=nil;
|
||||||
NormalUnits:=nil;
|
NormalUnits:=nil;
|
||||||
try
|
try
|
||||||
|
fSettings.AddLogLine('');
|
||||||
|
fSettings.AddLogLine(lisConvDelphiFindAllUnitFiles);
|
||||||
|
DebugLn('');
|
||||||
|
DebugLn('TConvertDelphiPackage.FindAllUnits: '+lisConvDelphiFindAllUnitFiles);
|
||||||
if not CodeToolBoss.FindDelphiPackageUnits(fMainUnitConverter.fPascalBuffer,
|
if not CodeToolBoss.FindDelphiPackageUnits(fMainUnitConverter.fPascalBuffer,
|
||||||
FoundUnits, MisUnits, NormalUnits) then
|
FoundUnits, MisUnits, NormalUnits) then
|
||||||
begin
|
begin
|
||||||
|
@ -527,6 +527,7 @@ begin
|
|||||||
LoopCount:=0; // Prevent possible eternal loops with a counter
|
LoopCount:=0; // Prevent possible eternal loops with a counter
|
||||||
repeat
|
repeat
|
||||||
repeat
|
repeat
|
||||||
|
DebugLn('TLFMFixer.ConvertAndRepair: Checking LFM for '+fPascalBuffer.Filename);
|
||||||
if not fLFMTree.ParseIfNeeded then exit;
|
if not fLFMTree.ParseIfNeeded then exit;
|
||||||
if CodeToolBoss.CheckLFM(fPascalBuffer, fLFMBuffer, fLFMTree,
|
if CodeToolBoss.CheckLFM(fPascalBuffer, fLFMBuffer, fLFMTree,
|
||||||
fRootMustBeClassInUnit, fRootMustBeClassInIntf, fObjectsMustExist) then
|
fRootMustBeClassInUnit, fRootMustBeClassInIntf, fObjectsMustExist) then
|
||||||
@ -544,6 +545,8 @@ begin
|
|||||||
Result:=mrOk
|
Result:=mrOk
|
||||||
else begin
|
else begin
|
||||||
Result:=FindAndFixMissingComponentClasses; // Can return mrRetry.
|
Result:=FindAndFixMissingComponentClasses; // Can return mrRetry.
|
||||||
|
if Result=mrRetry then
|
||||||
|
DebugLn('TLFMFixer.ConvertAndRepair: Added unit to uses section -> another loop');
|
||||||
end;
|
end;
|
||||||
Inc(LoopCount); // Increment also in outer loop
|
Inc(LoopCount); // Increment also in outer loop
|
||||||
until (Result in [mrOK, mrAbort]) or (LoopCount>MaxLoopCount);
|
until (Result in [mrOK, mrAbort]) or (LoopCount>MaxLoopCount);
|
||||||
|
Loading…
Reference in New Issue
Block a user