mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-20 17:14:29 +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;
|
||||
end;
|
||||
|
||||
if (not Found) then begin
|
||||
if FIsIncludeDirective then begin
|
||||
if FIsIncludeDirective then
|
||||
begin
|
||||
if (not Found) then begin
|
||||
// search include file
|
||||
SearchPath:='.;'+CodeToolBoss.DefineTree.GetIncludePathForDirectory(BaseDir);
|
||||
if FindFile(SearchPath) then
|
||||
if FindFile(SearchPath) then // sets FFileName if result=true
|
||||
Found:=true;
|
||||
end else if FilenameIsPascalSource(FFileName) or (ExtractFileExt(FFileName)='') then
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
if (not Found) then
|
||||
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);
|
||||
InFilename:=FFileName;
|
||||
if ExtractFileExt(FFileName)='' then InFilename:='';
|
||||
NewFilename:=CodeToolBoss.DirectoryCachePool.FindUnitSourceInCompletePath(
|
||||
BaseDir,AUnitName,InFilename,true);
|
||||
if NewFilename<>'' then begin
|
||||
|
Loading…
Reference in New Issue
Block a user