mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-20 23:21:44 +02:00
IDE: open unit support for dotted unit names. Issue #29046
git-svn-id: trunk@53255 -
This commit is contained in:
parent
0c617048fe
commit
085a9bfc83
@ -1505,18 +1505,34 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (not Found) then begin
|
if FIsIncludeDirective then
|
||||||
if FIsIncludeDirective then begin
|
begin
|
||||||
|
if (not Found) then begin
|
||||||
// search include file
|
// search include file
|
||||||
SearchPath:='.;'+CodeToolBoss.DefineTree.GetIncludePathForDirectory(BaseDir);
|
SearchPath:='.;'+CodeToolBoss.DefineTree.GetIncludePathForDirectory(BaseDir);
|
||||||
if FindFile(SearchPath) then
|
if FindFile(SearchPath) then // sets FFileName if result=true
|
||||||
Found:=true;
|
Found:=true;
|
||||||
end else if FilenameIsPascalSource(FFileName) or (ExtractFileExt(FFileName)='') then
|
end;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if (not Found) then
|
||||||
begin
|
begin
|
||||||
// search pascal unit
|
// search pascal unit without extension
|
||||||
|
AUnitName:=FFileName;
|
||||||
|
InFilename:='';
|
||||||
|
NewFilename:=CodeToolBoss.DirectoryCachePool.FindUnitSourceInCompletePath(
|
||||||
|
BaseDir,AUnitName,InFilename,true);
|
||||||
|
if NewFilename<>'' then begin
|
||||||
|
Found:=true;
|
||||||
|
FFileName:=NewFilename;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if (not Found) and (ExtractFileExt(FFileName)<>'') then
|
||||||
|
begin
|
||||||
|
// search pascal unit with extension
|
||||||
AUnitName:=ExtractFileNameOnly(FFileName);
|
AUnitName:=ExtractFileNameOnly(FFileName);
|
||||||
InFilename:=FFileName;
|
InFilename:=FFileName;
|
||||||
if ExtractFileExt(FFileName)='' then InFilename:='';
|
|
||||||
NewFilename:=CodeToolBoss.DirectoryCachePool.FindUnitSourceInCompletePath(
|
NewFilename:=CodeToolBoss.DirectoryCachePool.FindUnitSourceInCompletePath(
|
||||||
BaseDir,AUnitName,InFilename,true);
|
BaseDir,AUnitName,InFilename,true);
|
||||||
if NewFilename<>'' then begin
|
if NewFilename<>'' then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user