mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-02 19:58:16 +02:00
IDE: improved message improve for can not find unit, when a package can not findone of its own units
git-svn-id: trunk@39949 -
This commit is contained in:
parent
4c2834e47a
commit
7b25e8ece6
@ -438,7 +438,7 @@ var
|
||||
CodeBuf: TCodeBuffer;
|
||||
MissingUnitname: String;
|
||||
UsedByUnit: String;
|
||||
NewFilename: String;
|
||||
NewFilename: String; // referencing unit
|
||||
Dir: String;
|
||||
PPUFilename: String;
|
||||
s: String;
|
||||
@ -556,12 +556,20 @@ begin
|
||||
s:='Can not find unit '+MissingUnitname;
|
||||
if UsedByUnit<>'' then
|
||||
s+=' used by '+UsedByUnit;
|
||||
if PkgName<>'' then
|
||||
s+='. Check if package '+PkgName+' is in the dependencies';
|
||||
if UsedByOwner is TLazProject then
|
||||
s+=' of the project inspector'
|
||||
else if UsedByOwner is TIDEPackage then
|
||||
s+=' of package '+TIDEPackage(UsedByOwner).Name;
|
||||
if (UsedByOwner is TIDEPackage)
|
||||
and (CompareTextCT(TIDEPackage(UsedByOwner).Name,PkgName)=0) then
|
||||
begin
|
||||
// unit of package is not found by a unit of package
|
||||
s+='. Check search path of package '+TIDEPackage(UsedByOwner).Name
|
||||
+' and unit cycles.';
|
||||
end else begin
|
||||
if PkgName<>'' then
|
||||
s+='. Check if package '+PkgName+' is in the dependencies';
|
||||
if UsedByOwner is TLazProject then
|
||||
s+=' of the project inspector'
|
||||
else if UsedByOwner is TIDEPackage then
|
||||
s+=' of package '+TIDEPackage(UsedByOwner).Name;
|
||||
end;
|
||||
s+='.';
|
||||
end;
|
||||
Msg.GetSourcePosition(Filename,Line,Col);
|
||||
|
Loading…
Reference in New Issue
Block a user