mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 16:10:19 +02:00
codetools: find sources in fpc unit search paths
git-svn-id: trunk@32240 -
This commit is contained in:
parent
d7f55a0794
commit
73d34d3088
@ -5630,7 +5630,7 @@ begin
|
|||||||
debugln(['TCodeToolManager.DirectoryCachePoolGetUnitFromSet outdated UnitSet="',dbgstr(UnitSet),'"']);
|
debugln(['TCodeToolManager.DirectoryCachePoolGetUnitFromSet outdated UnitSet="',dbgstr(UnitSet),'"']);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Result:=UnitSetCache.GetUnitSrcFile(AnUnitName);
|
Result:=UnitSetCache.GetUnitSrcFile(AnUnitName,false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeToolManager.DirectoryCachePoolGetCompiledUnitFromSet(
|
function TCodeToolManager.DirectoryCachePoolGetCompiledUnitFromSet(
|
||||||
|
@ -8810,7 +8810,7 @@ begin
|
|||||||
if ConfigCache.HasPPUs then begin
|
if ConfigCache.HasPPUs then begin
|
||||||
// but there are other ppu files
|
// but there are other ppu files
|
||||||
{$IFDEF ShowTriedUnits}
|
{$IFDEF ShowTriedUnits}
|
||||||
debugln(['TFPCUnitSetCache.GetUnitSrcFile Unit="',AnUnitName,'" unit has no ppu file in FPC path, but there are other']);
|
debugln(['TFPCUnitSetCache.GetUnitSrcFile Unit="',AnUnitName,'" unit has no ppu file in FPC path, but there are other ppu']);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end else begin
|
end else begin
|
||||||
@ -8828,8 +8828,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
if Tree<>nil then begin
|
if Tree<>nil then begin
|
||||||
Result:=Tree[AnUnitName];
|
Result:=Tree[AnUnitName];
|
||||||
if Result<>'' then
|
if (Result<>'') and (not FilenameIsAbsolute(Result)) then
|
||||||
Result:=FPCSourceDirectory+Result;
|
Result:=FPCSourceDirectory+Result;
|
||||||
|
if (Result='') then begin
|
||||||
|
// maybe the source is in the fpc search path
|
||||||
|
ConfigCache:=GetConfigCache(false);
|
||||||
|
if ConfigCache<>nil then begin
|
||||||
|
Result:=ConfigCache.Units[AnUnitName];
|
||||||
|
if (CompareFileExt(Result,'ppu',false)=0) then begin
|
||||||
|
Result:='';
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
{$IFDEF ShowTriedUnits}
|
{$IFDEF ShowTriedUnits}
|
||||||
debugln(['TFPCUnitSetCache.GetUnitSrcFile Unit="',AnUnitName,'" Result=',Result]);
|
debugln(['TFPCUnitSetCache.GetUnitSrcFile Unit="',AnUnitName,'" Result=',Result]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
@ -1223,7 +1223,7 @@ begin
|
|||||||
Result:=FindUnitSourceInCleanSearchPath(AUnitName,SrcPath,AnyCase);
|
Result:=FindUnitSourceInCleanSearchPath(AUnitName,SrcPath,AnyCase);
|
||||||
end;
|
end;
|
||||||
if Result='' then begin
|
if Result='' then begin
|
||||||
// search in unit links
|
// search in unit set
|
||||||
{$IFDEF ShowTriedUnits}
|
{$IFDEF ShowTriedUnits}
|
||||||
DebugLn(['TCTDirectoryCache.FindUnitSourceInCompletePath unit ',AUnitName,' not found in SrcPath="',SrcPath,'" Directory="',Directory,'" searchin in unitset ...']);
|
DebugLn(['TCTDirectoryCache.FindUnitSourceInCompletePath unit ',AUnitName,' not found in SrcPath="',SrcPath,'" Directory="',Directory,'" searchin in unitset ...']);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
Loading…
Reference in New Issue
Block a user