IDE: fpdoc editor: select link: fixed listing project units

git-svn-id: trunk@22598 -
This commit is contained in:
mattias 2009-11-15 14:28:23 +00:00
parent 72ac7c6fc2
commit 2b915673c6
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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);