IDE: improve comments in LFMChecker, formatting

git-svn-id: trunk@40561 -
This commit is contained in:
juha 2013-03-16 17:58:39 +00:00
parent 1e6aba487f
commit bd059601c2

View File

@ -500,17 +500,16 @@ begin
MissingObjectTypes.Add(TypeName); MissingObjectTypes.Add(TypeName);
end; end;
CurError:=CurError.NextError; CurError:=CurError.NextError;
end; // Missing object types in unit. end;
// keep all object types with a registered component class // keep only the missing object types with a registered component class
for i:=MissingObjectTypes.Count-1 downto 0 do begin for i:=MissingObjectTypes.Count-1 downto 0 do begin
RegComp:=IDEComponentPalette.FindComponent(MissingObjectTypes[i]); RegComp:=IDEComponentPalette.FindComponent(MissingObjectTypes[i]);
if (RegComp=nil) or (RegComp.GetUnitName='') then if (RegComp=nil) or (RegComp.GetUnitName='') then
MissingObjectTypes.Delete(i); MissingObjectTypes.Delete(i);
end; end;
if MissingObjectTypes.Count=0 then exit; // Now the list contains only types that are found in IDE.
// Missing object types, but luckily found in IDE. if MissingObjectTypes.Count>0 then
Result:=FixMissingComponentClasses(MissingObjectTypes); // Fix them. Result:=FixMissingComponentClasses(MissingObjectTypes); // Fix them.
finally finally
MissingObjectTypes.Free; MissingObjectTypes.Free;
@ -523,7 +522,6 @@ begin
Result:=PackageEditingInterface.AddUnitDependenciesForComponentClasses( Result:=PackageEditingInterface.AddUnitDependenciesForComponentClasses(
fPascalBuffer.Filename, aMissingTypes); fPascalBuffer.Filename, aMissingTypes);
if Result<>mrOk then exit; if Result<>mrOk then exit;
// check LFM again // check LFM again
if CodeToolBoss.CheckLFM(fPascalBuffer,fLFMBuffer,fLFMTree, if CodeToolBoss.CheckLFM(fPascalBuffer,fLFMBuffer,fLFMTree,
fRootMustBeClassInUnit,fRootMustBeClassInIntf,fObjectsMustExist) fRootMustBeClassInUnit,fRootMustBeClassInIntf,fObjectsMustExist)