mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 05:39:17 +02:00
IDE: unified ide debugln
This commit is contained in:
parent
aed9709336
commit
f5eead6d84
@ -408,7 +408,8 @@ end;
|
|||||||
|
|
||||||
procedure TProjectResources.ResourceModified(Sender: TObject);
|
procedure TProjectResources.ResourceModified(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Modified := Modified or TAbstractProjectResource(Sender).Modified;
|
if TAbstractProjectResource(Sender).Modified then
|
||||||
|
Modified := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TProjectResources.Create(AProject: TLazProject);
|
constructor TProjectResources.Create(AProject: TLazProject);
|
||||||
@ -522,7 +523,7 @@ begin
|
|||||||
try
|
try
|
||||||
// update resources (FLazarusResources, FSystemResources, ...)
|
// update resources (FLazarusResources, FSystemResources, ...)
|
||||||
if not Update then begin
|
if not Update then begin
|
||||||
debugln(['TProjectResources.Regenerate Update failed']);
|
debugln(['Error: (lazarus) [TProjectResources.Regenerate] Update failed']);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
if LastSavedRes='' then begin
|
if LastSavedRes='' then begin
|
||||||
@ -537,12 +538,12 @@ begin
|
|||||||
UpdateLrsCodeBuffer;
|
UpdateLrsCodeBuffer;
|
||||||
// update .lpr file (old and new include files exist, so parsing should work without errors)
|
// update .lpr file (old and new include files exist, so parsing should work without errors)
|
||||||
if UpdateSource and not UpdateMainSourceFile(MainFileName) then begin
|
if UpdateSource and not UpdateMainSourceFile(MainFileName) then begin
|
||||||
debugln(['TProjectResources.Regenerate UpdateMainSourceFile failed']);
|
debugln(['Error: (lazarus) [TProjectResources.Regenerate UpdateMainSourceFile] failed']);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if PerformSave and not Save(SaveToTestDir) then begin
|
if PerformSave and not Save(SaveToTestDir) then begin
|
||||||
debugln(['TProjectResources.Regenerate Save failed']);
|
debugln(['Error: (lazarus) [TProjectResources.Regenerate] Save failed']);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
@ -686,14 +687,9 @@ begin
|
|||||||
|
|
||||||
// Check that .lpr contains Forms and Interfaces in the uses section. If it does not
|
// Check that .lpr contains Forms and Interfaces in the uses section. If it does not
|
||||||
// we cannot add LResources (it is not a lazarus application)
|
// we cannot add LResources (it is not a lazarus application)
|
||||||
CodeToolBoss.ActivateWriteLock;
|
FLrsIncludeAllowed :=
|
||||||
try
|
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Forms', NamePos, InPos, True) and
|
||||||
FLrsIncludeAllowed :=
|
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Interfaces', NamePos, InPos, True);
|
||||||
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Forms', NamePos, InPos, True) and
|
|
||||||
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Interfaces', NamePos, InPos, True);
|
|
||||||
finally
|
|
||||||
CodeToolBoss.DeactivateWriteLock;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TProjectResources.RenameDirectives(const CurFileName, NewFileName: String): Boolean;
|
function TProjectResources.RenameDirectives(const CurFileName, NewFileName: String): Boolean;
|
||||||
@ -825,7 +821,7 @@ begin
|
|||||||
except
|
except
|
||||||
on E: Exception do
|
on E: Exception do
|
||||||
begin
|
begin
|
||||||
debugln('TProjectResources.UpdateResCodeBuffer exception %s: %s', [E.ClassName, E.Message]);
|
debugln('Error: (lazarus) [TProjectResources.UpdateResCodeBuffer] exception %s: %s', [E.ClassName, E.Message]);
|
||||||
ResStream.Size := 0;
|
ResStream.Size := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user