mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:59:16 +02:00
IDE: fpdoc editor: select link: fixed listing project units
git-svn-id: trunk@22598 -
This commit is contained in:
parent
72ac7c6fc2
commit
2b915673c6
@ -1559,9 +1559,13 @@ begin
|
||||
end;
|
||||
|
||||
// check if in the doc path of the project
|
||||
if (AProject<>nil) and (AProject.LazDocPaths<>'') then begin
|
||||
if (AProject<>nil) and (AProject.LazDocPaths<>'')
|
||||
and FilenameIsAbsolute(AProject.ProjectInfoFile) then begin
|
||||
Path:=ExtractFilePath(FPDocFile.Filename);
|
||||
SearchPath:=AProject.LazDocPaths;
|
||||
IDEMacros.CreateAbsoluteSearchPath(SearchPath,
|
||||
ExtractFilePath(AProject.ProjectInfoFile));
|
||||
SearchPath:=TrimSearchPath(SearchPath,'');
|
||||
p:=FindPathInSearchPath(PChar(Path),length(Path),
|
||||
PChar(SearchPath),length(SearchPath));
|
||||
if p<>nil then begin
|
||||
|
@ -360,6 +360,7 @@ var
|
||||
AProject: TLazProject;
|
||||
APackage: TLazPackage;
|
||||
begin
|
||||
DebugLn(['TFPDocLinkEditorDlg.AddModuleUnits ',DbgSName(ModuleOwner)]);
|
||||
if ModuleOwner=nil then exit;
|
||||
if ModuleOwner is TLazProject then begin
|
||||
AProject:=TLazProject(ModuleOwner);
|
||||
@ -378,12 +379,14 @@ var
|
||||
ProjFile: TLazProjectFile;
|
||||
Identifier: String;
|
||||
begin
|
||||
DebugLn(['TFPDocLinkEditorDlg.AddProjectUnits ']);
|
||||
for i:=0 to AProject.FileCount-1 do begin
|
||||
ProjFile:=AProject.Files[i];
|
||||
if ProjFile.IsPartOfProject then begin
|
||||
Filename:=ProjFile.Filename;
|
||||
if FilenameIsPascalUnit(Filename) then begin
|
||||
Filename:=ExtractFileNameOnly(Filename);
|
||||
DebugLn(['TFPDocLinkEditorDlg.AddProjectUnits ',Prefix,' ',Filename]);
|
||||
if (CompareFilenames(Prefix,copy(Filename,1,length(Prefix)))=0) then
|
||||
begin
|
||||
Identifier:=ExtractFileNameOnly(ProjFile.Filename);
|
||||
|
Loading…
Reference in New Issue
Block a user