mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 00:37:14 +01:00
ide: load unit source buffer if it was not loaded before in LoadDependencyHidden, improve verbosity
git-svn-id: trunk@14848 -
This commit is contained in:
parent
c2db5ffa0f
commit
b70cfb3a82
@ -1454,6 +1454,8 @@ begin
|
||||
MainCode:=GetMainCode(Code);
|
||||
if MainCode=nil then begin
|
||||
fErrorMsg:='TCodeToolManager.InitCurCodeTool MainCode=nil';
|
||||
if Code = nil then
|
||||
fErrorMsg := fErrorMsg + ' Code=nil';
|
||||
exit;
|
||||
end;
|
||||
if MainCode.Scanner=nil then begin
|
||||
|
||||
12
ide/main.pp
12
ide/main.pp
@ -5592,7 +5592,7 @@ var
|
||||
function LoadDependencyHidden(const RefRootName: string): TModalResult;
|
||||
var
|
||||
LFMFilename: String;
|
||||
LFMCode: TCodeBuffer;
|
||||
UnitCode, LFMCode: TCodeBuffer;
|
||||
ModalResult: TModalResult;
|
||||
UnitFilename: String;
|
||||
RefUnitInfo: TUnitInfo;
|
||||
@ -5620,6 +5620,16 @@ var
|
||||
Project1.AddFile(RefUnitInfo,false);
|
||||
end;
|
||||
|
||||
if RefUnitInfo.Source = nil then
|
||||
begin
|
||||
ModalResult := LoadCodeBuffer(UnitCode, UnitFileName, [lbfCheckIfText]);
|
||||
if ModalResult<>mrOk then begin
|
||||
debugln('TMainIDE.DoFixupComponentReferences Failed loading ',UnitFilename);
|
||||
exit(mrCancel);
|
||||
end;
|
||||
RefUnitInfo.Source := UnitCode;
|
||||
end;
|
||||
|
||||
// load resource hidden
|
||||
Result:=DoLoadLFM(RefUnitInfo,LFMCode,
|
||||
OpenFlags+[ofLoadHiddenResource],[]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user