mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-21 01:48:19 +02:00
IDE: renamed some lazdoc to fpdoc
git-svn-id: trunk@34822 -
This commit is contained in:
parent
3b215059ba
commit
dedcacd54d
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -4148,6 +4148,7 @@ ide/findunitdlg.lfm svneol=native#text/plain
|
|||||||
ide/findunitdlg.pas svneol=native#text/plain
|
ide/findunitdlg.pas svneol=native#text/plain
|
||||||
ide/formeditor.pp svneol=native#text/pascal
|
ide/formeditor.pp svneol=native#text/pascal
|
||||||
ide/fpcsrcscan.pas svneol=native#text/pascal
|
ide/fpcsrcscan.pas svneol=native#text/pascal
|
||||||
|
ide/fpdocediticons.lrs svneol=native#text/pascal
|
||||||
ide/fpdoceditwindow.lfm svneol=native#text/plain
|
ide/fpdoceditwindow.lfm svneol=native#text/plain
|
||||||
ide/fpdoceditwindow.pas svneol=native#text/plain
|
ide/fpdoceditwindow.pas svneol=native#text/plain
|
||||||
ide/fpdochints.pas svneol=native#text/plain
|
ide/fpdochints.pas svneol=native#text/plain
|
||||||
@ -4328,7 +4329,6 @@ ide/lazarusmanager.pas svneol=native#text/pascal
|
|||||||
ide/lazbuild.lpi svneol=native#text/plain
|
ide/lazbuild.lpi svneol=native#text/plain
|
||||||
ide/lazbuild.lpr svneol=native#text/plain
|
ide/lazbuild.lpr svneol=native#text/plain
|
||||||
ide/lazconf.pp svneol=native#text/pascal
|
ide/lazconf.pp svneol=native#text/pascal
|
||||||
ide/lazdoc.lrs svneol=native#text/pascal
|
|
||||||
ide/macropromptdlg.pas svneol=native#text/pascal
|
ide/macropromptdlg.pas svneol=native#text/pascal
|
||||||
ide/main.pp svneol=native#text/pascal
|
ide/main.pp svneol=native#text/pascal
|
||||||
ide/mainbar.pas svneol=native#text/pascal
|
ide/mainbar.pas svneol=native#text/pascal
|
||||||
|
116
ide/codehelp.pas
116
ide/codehelp.pas
@ -28,12 +28,12 @@ unit CodeHelp;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
{off $DEFINE VerboseLazDoc}
|
{off $DEFINE VerboseCodeHelp}
|
||||||
{off $DEFINE VerboseLazDocFails}
|
{off $DEFINE VerboseCodeHelpFails}
|
||||||
{off $DEFINE VerboseHints}
|
{off $DEFINE VerboseHints}
|
||||||
|
|
||||||
{$IFDEF VerboseLazDoc}
|
{$IFDEF VerboseCodeHelp}
|
||||||
{$DEFINE VerboseLazDocFails}
|
{$DEFINE VerboseCodeHelpFails}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -828,7 +828,7 @@ begin
|
|||||||
finally
|
finally
|
||||||
MemStream.Free;
|
MemStream.Free;
|
||||||
end;
|
end;
|
||||||
{$ifdef VerboseLazDoc}
|
{$ifdef VerboseCodeHelp}
|
||||||
if Result<>'' then
|
if Result<>'' then
|
||||||
DebugLn(['TLazFPDocFile.GetChildValuesAsString Node=',Node.NodeName,' Result=',Result]);
|
DebugLn(['TLazFPDocFile.GetChildValuesAsString Node=',Node.NodeName,' Result=',Result]);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -1100,9 +1100,9 @@ function TCodeHelpManager.DoCreateFPDocFileForSource(const SrcFilename: string;
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function SelectNewLazDocPaths(const Title, BaseDir: string): string;
|
function SelectNewFPDocPaths(const Title, BaseDir: string): string;
|
||||||
begin
|
begin
|
||||||
Result:=LazSelectDirectory('Choose LazDoc directory for '+Title,BaseDir);
|
Result:=LazSelectDirectory('Choose FPDoc directory for '+Title,BaseDir);
|
||||||
if (Result<>'') then
|
if (Result<>'') then
|
||||||
Result:=CreateRelativePath(Result,BaseDir);
|
Result:=CreateRelativePath(Result,BaseDir);
|
||||||
end;
|
end;
|
||||||
@ -1112,8 +1112,8 @@ var
|
|||||||
AProject: TLazProject;
|
AProject: TLazProject;
|
||||||
APackage: TLazPackage;
|
APackage: TLazPackage;
|
||||||
p: Integer;
|
p: Integer;
|
||||||
LazDocPaths: String;
|
FPDocPaths: String;
|
||||||
LazDocPackageName: String;
|
FPDocPackageName: String;
|
||||||
NewPath: String;
|
NewPath: String;
|
||||||
BaseDir: String;
|
BaseDir: String;
|
||||||
Code: TCodeBuffer;
|
Code: TCodeBuffer;
|
||||||
@ -1154,32 +1154,32 @@ begin
|
|||||||
if NewOwner is TLazProject then begin
|
if NewOwner is TLazProject then begin
|
||||||
AProject:=TLazProject(NewOwner);
|
AProject:=TLazProject(NewOwner);
|
||||||
BaseDir:=ExtractFilePath(AProject.ProjectInfoFile);
|
BaseDir:=ExtractFilePath(AProject.ProjectInfoFile);
|
||||||
if AProject.LazDocPaths='' then
|
if AProject.FPDocPaths='' then
|
||||||
AProject.LazDocPaths:=SelectNewLazDocPaths(AProject.ShortDescription,BaseDir);
|
AProject.FPDocPaths:=SelectNewFPDocPaths(AProject.ShortDescription,BaseDir);
|
||||||
LazDocPaths:=AProject.LazDocPaths;
|
FPDocPaths:=AProject.FPDocPaths;
|
||||||
LazDocPackageName:=GetModuleOwnerName(AProject);
|
FPDocPackageName:=GetModuleOwnerName(AProject);
|
||||||
end else if NewOwner is TLazPackage then begin
|
end else if NewOwner is TLazPackage then begin
|
||||||
APackage:=TLazPackage(NewOwner);
|
APackage:=TLazPackage(NewOwner);
|
||||||
BaseDir:=APackage.DirectoryExpanded;
|
BaseDir:=APackage.DirectoryExpanded;
|
||||||
if APackage.LazDocPaths='' then
|
if APackage.FPDocPaths='' then
|
||||||
APackage.LazDocPaths:=SelectNewLazDocPaths(APackage.Name,BaseDir);
|
APackage.FPDocPaths:=SelectNewFPDocPaths(APackage.Name,BaseDir);
|
||||||
LazDocPaths:=APackage.LazDocPaths;
|
FPDocPaths:=APackage.FPDocPaths;
|
||||||
LazDocPackageName:=GetModuleOwnerName(APackage);
|
FPDocPackageName:=GetModuleOwnerName(APackage);
|
||||||
end else if NewOwner=LazarusHelp then begin
|
end else if NewOwner=LazarusHelp then begin
|
||||||
BaseDir:=EnvironmentOptions.LazarusDirectory;
|
BaseDir:=EnvironmentOptions.LazarusDirectory;
|
||||||
LazDocPaths:=GetIDESrcFPDocPath;
|
FPDocPaths:=GetIDESrcFPDocPath;
|
||||||
LazDocPackageName:=IDEProjectName;
|
FPDocPackageName:=IDEProjectName;
|
||||||
end else begin
|
end else begin
|
||||||
DebugLn(['TCodeHelpManager.DoCreateFPDocFileForSource unknown owner type ',dbgsName(NewOwner)]);
|
DebugLn(['TCodeHelpManager.DoCreateFPDocFileForSource unknown owner type ',dbgsName(NewOwner)]);
|
||||||
NewOwner:=nil;
|
NewOwner:=nil;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IDEMacros.CreateAbsoluteSearchPath(LazDocPaths,BaseDir);
|
IDEMacros.CreateAbsoluteSearchPath(FPDocPaths,BaseDir);
|
||||||
|
|
||||||
p:=1;
|
p:=1;
|
||||||
repeat
|
repeat
|
||||||
NewPath:=GetNextDirectoryInSearchPath(LazDocPaths,p);
|
NewPath:=GetNextDirectoryInSearchPath(FPDocPaths,p);
|
||||||
if not FilenameIsAbsolute(NewPath) then
|
if not FilenameIsAbsolute(NewPath) then
|
||||||
NewPath:=AppendPathDelim(BaseDir)+NewPath;
|
NewPath:=AppendPathDelim(BaseDir)+NewPath;
|
||||||
if DirPathExistsCached(NewPath) then begin
|
if DirPathExistsCached(NewPath) then begin
|
||||||
@ -1196,17 +1196,17 @@ begin
|
|||||||
if AVLNode<>nil then
|
if AVLNode<>nil then
|
||||||
FSrcToDocMap.FreeAndDelete(AVLNode);
|
FSrcToDocMap.FreeAndDelete(AVLNode);
|
||||||
// create fpdoc file
|
// create fpdoc file
|
||||||
if CreateFPDocFile(Result,LazDocPackageName,CurUnitName)=nil then
|
if CreateFPDocFile(Result,FPDocPackageName,CurUnitName)=nil then
|
||||||
Result:='';
|
Result:='';
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
until false;
|
until false;
|
||||||
|
|
||||||
// no valid directory found
|
// no valid directory found
|
||||||
DebugLn(['TCodeHelpManager.DoCreateFPDocFileForSource LazDocModul="',LazDocPackageName,'" LazDocPaths="',LazDocPaths,'" ']);
|
DebugLn(['TCodeHelpManager.DoCreateFPDocFileForSource FPDocModul="',FPDocPackageName,'" FPDocPaths="',FPDocPaths,'" ']);
|
||||||
MessageDlg(lisLDNoValidLazDocPath,
|
MessageDlg(lisLDNoValidFPDocPath,
|
||||||
Format(lisLDDoesNotHaveAnyValidLazDocPathUnableToCreateTheFpdo, [
|
Format(lisLDDoesNotHaveAnyValidFPDocPathUnableToCreateTheFpdo, [
|
||||||
LazDocPackageName, #13, SrcFilename]), mtError, [mbCancel], 0);
|
FPDocPackageName, #13, SrcFilename]), mtError, [mbCancel], 0);
|
||||||
finally
|
finally
|
||||||
PkgList.Free;
|
PkgList.Free;
|
||||||
end;
|
end;
|
||||||
@ -1345,7 +1345,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
CacheWasUsed:=false;
|
CacheWasUsed:=false;
|
||||||
|
|
||||||
{$IFDEF VerboseLazDoc}
|
{$IFDEF VerboseCodeHelp}
|
||||||
DebugLn(['TCodeHelpManager.LoadFPDocFile parsing ',ADocFile.Filename]);
|
DebugLn(['TCodeHelpManager.LoadFPDocFile parsing ',ADocFile.Filename]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
CallDocChangeEvents(chmhDocChanging,ADocFile);
|
CallDocChangeEvents(chmhDocChanging,ADocFile);
|
||||||
@ -1518,20 +1518,20 @@ var
|
|||||||
if TObject(PkgList[i]) is TLazProject then begin
|
if TObject(PkgList[i]) is TLazProject then begin
|
||||||
AProject:=TLazProject(PkgList[i]);
|
AProject:=TLazProject(PkgList[i]);
|
||||||
AnOwner:=AProject;
|
AnOwner:=AProject;
|
||||||
if AProject.LazDocPaths='' then continue;
|
if AProject.FPDocPaths='' then continue;
|
||||||
BaseDir:=ExtractFilePath(AProject.ProjectInfoFile);
|
BaseDir:=ExtractFilePath(AProject.ProjectInfoFile);
|
||||||
if BaseDir='' then continue;
|
if BaseDir='' then continue;
|
||||||
// add lazdoc paths of project
|
// add fpdoc paths of project
|
||||||
if SearchInPath(AProject.LazDocPaths,BaseDir,Filename) then
|
if SearchInPath(AProject.FPDocPaths,BaseDir,Filename) then
|
||||||
exit(true);
|
exit(true);
|
||||||
end else if TObject(PkgList[i]) is TLazPackage then begin
|
end else if TObject(PkgList[i]) is TLazPackage then begin
|
||||||
APackage:=TLazPackage(PkgList[i]);
|
APackage:=TLazPackage(PkgList[i]);
|
||||||
AnOwner:=APackage;
|
AnOwner:=APackage;
|
||||||
if APackage.LazDocPaths='' then continue;
|
if APackage.FPDocPaths='' then continue;
|
||||||
BaseDir:=APackage.Directory;
|
BaseDir:=APackage.Directory;
|
||||||
if BaseDir='' then continue;
|
if BaseDir='' then continue;
|
||||||
// add lazdoc paths of package
|
// add fpdoc paths of package
|
||||||
if SearchInPath(APackage.LazDocPaths,BaseDir,Filename) then begin
|
if SearchInPath(APackage.FPDocPaths,BaseDir,Filename) then begin
|
||||||
exit(true);
|
exit(true);
|
||||||
end else if AnOwner=nil then
|
end else if AnOwner=nil then
|
||||||
AnOwner:=APackage;
|
AnOwner:=APackage;
|
||||||
@ -1555,7 +1555,7 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// finally: check if in user directories
|
// finally: check if in user directories
|
||||||
if SearchInPath(EnvironmentOptions.LazDocPaths,'',Filename) then
|
if SearchInPath(EnvironmentOptions.FPDocPaths,'',Filename) then
|
||||||
begin
|
begin
|
||||||
AnOwner:=nil;
|
AnOwner:=nil;
|
||||||
exit(true);
|
exit(true);
|
||||||
@ -1602,7 +1602,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
CacheWasUsed:=false;
|
CacheWasUsed:=false;
|
||||||
|
|
||||||
{$IFDEF VerboseLazDoc}
|
{$IFDEF VerboseCodeHelp}
|
||||||
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource searching SrcFilename=',SrcFilename]);
|
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource searching SrcFilename=',SrcFilename]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1617,7 +1617,7 @@ begin
|
|||||||
if AnOwner=nil then
|
if AnOwner=nil then
|
||||||
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource Hint: file without owner: ',SrcFilename])
|
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource Hint: file without owner: ',SrcFilename])
|
||||||
else
|
else
|
||||||
debugln(['TCodeHelpManager.GetFPDocFilenameForSource Hint: Owner has no lazdoc paths: ',SrcFilename]);
|
debugln(['TCodeHelpManager.GetFPDocFilenameForSource Hint: Owner has no fpdoc paths: ',SrcFilename]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// save to cache
|
// save to cache
|
||||||
@ -1633,11 +1633,11 @@ begin
|
|||||||
if (Result='') and CreateIfNotExists then begin
|
if (Result='') and CreateIfNotExists then begin
|
||||||
Result:=DoCreateFPDocFileForSource(SrcFilename,AnOwner);
|
Result:=DoCreateFPDocFileForSource(SrcFilename,AnOwner);
|
||||||
end;
|
end;
|
||||||
{$IFDEF VerboseLazDoc}
|
{$IFDEF VerboseCodeHelp}
|
||||||
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource SrcFilename="',SrcFilename,'" Result="',Result,'"']);
|
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource SrcFilename="',SrcFilename,'" Result="',Result,'"']);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
{$ifdef VerboseLazDoc}
|
{$ifdef VerboseCodeHelp}
|
||||||
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource ',dbgsName(AnOwner)]);
|
DebugLn(['TCodeHelpManager.GetFPDocFilenameForSource ',dbgsName(AnOwner)]);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
@ -1654,7 +1654,7 @@ begin
|
|||||||
Result:='';
|
Result:='';
|
||||||
CacheWasUsed:=false;
|
CacheWasUsed:=false;
|
||||||
APackage:=TLazPackage(PkgFile.LazPackage);
|
APackage:=TLazPackage(PkgFile.LazPackage);
|
||||||
if APackage.LazDocPaths='' then exit;
|
if APackage.FPDocPaths='' then exit;
|
||||||
BaseDir:=APackage.DirectoryExpanded;
|
BaseDir:=APackage.DirectoryExpanded;
|
||||||
if BaseDir='' then exit;
|
if BaseDir='' then exit;
|
||||||
|
|
||||||
@ -1672,7 +1672,7 @@ begin
|
|||||||
if not FilenameIsPascalUnit(SrcFilename) then exit;
|
if not FilenameIsPascalUnit(SrcFilename) then exit;
|
||||||
SrcFilename:=ExtractFileNameOnly(SrcFilename)+'.xml';
|
SrcFilename:=ExtractFileNameOnly(SrcFilename)+'.xml';
|
||||||
|
|
||||||
Result:=SearchFileInPath(SrcFilename,BaseDir,APackage.LazDocPaths,';',
|
Result:=SearchFileInPath(SrcFilename,BaseDir,APackage.FPDocPaths,';',
|
||||||
ctsfcDefault);
|
ctsfcDefault);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1765,10 +1765,10 @@ var
|
|||||||
SearchPath: String;
|
SearchPath: String;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
if (Pkg=nil) or (Pkg.LazDocPaths='') then exit;
|
if (Pkg=nil) or (Pkg.FPDocPaths='') then exit;
|
||||||
// check if the file is in the search path
|
// check if the file is in the search path
|
||||||
Path:=ExtractFilePath(FPDocFile.Filename);
|
Path:=ExtractFilePath(FPDocFile.Filename);
|
||||||
SearchPath:=Pkg.LazDocPaths;
|
SearchPath:=Pkg.FPDocPaths;
|
||||||
if not IDEMacros.CreateAbsoluteSearchPath(SearchPath,Pkg.Directory)
|
if not IDEMacros.CreateAbsoluteSearchPath(SearchPath,Pkg.Directory)
|
||||||
then
|
then
|
||||||
exit;
|
exit;
|
||||||
@ -1798,10 +1798,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// check if in the doc path of the project
|
// check if in the doc path of the project
|
||||||
if (AProject<>nil) and (AProject.LazDocPaths<>'')
|
if (AProject<>nil) and (AProject.FPDocPaths<>'')
|
||||||
and FilenameIsAbsolute(AProject.ProjectInfoFile) then begin
|
and FilenameIsAbsolute(AProject.ProjectInfoFile) then begin
|
||||||
Path:=ExtractFilePath(FPDocFile.Filename);
|
Path:=ExtractFilePath(FPDocFile.Filename);
|
||||||
SearchPath:=AProject.LazDocPaths;
|
SearchPath:=AProject.FPDocPaths;
|
||||||
IDEMacros.CreateAbsoluteSearchPath(SearchPath,
|
IDEMacros.CreateAbsoluteSearchPath(SearchPath,
|
||||||
ExtractFilePath(AProject.ProjectInfoFile));
|
ExtractFilePath(AProject.ProjectInfoFile));
|
||||||
SearchPath:=TrimSearchPath(SearchPath,'');
|
SearchPath:=TrimSearchPath(SearchPath,'');
|
||||||
@ -1857,7 +1857,7 @@ end;
|
|||||||
function TCodeHelpManager.ExpandFPDocLinkID(const LinkID,
|
function TCodeHelpManager.ExpandFPDocLinkID(const LinkID,
|
||||||
DefaultUnitName: string; TheOwner: TObject): string;
|
DefaultUnitName: string; TheOwner: TObject): string;
|
||||||
|
|
||||||
function SearchLazDocFile(SearchPath: string;
|
function SearchFPDocFile(SearchPath: string;
|
||||||
const BaseDir, AUnitname: string): string;
|
const BaseDir, AUnitname: string): string;
|
||||||
var
|
var
|
||||||
FPDocFilename: String;
|
FPDocFilename: String;
|
||||||
@ -1891,7 +1891,7 @@ begin
|
|||||||
APackage:=TLazPackage(TheOwner);
|
APackage:=TLazPackage(TheOwner);
|
||||||
if (APackage.FindUnit(FirstIdentifier)=nil) then begin
|
if (APackage.FindUnit(FirstIdentifier)=nil) then begin
|
||||||
// the unit is not owned.
|
// the unit is not owned.
|
||||||
if SearchLazDocFile(APackage.LazDocPaths,APackage.DirectoryExpanded,
|
if SearchFPDocFile(APackage.FPDocPaths,APackage.DirectoryExpanded,
|
||||||
FirstIdentifier)='' then
|
FirstIdentifier)='' then
|
||||||
begin
|
begin
|
||||||
// and there is no fpdoc file for this identifier
|
// and there is no fpdoc file for this identifier
|
||||||
@ -1901,7 +1901,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end else if TheOwner is TLazProject then begin
|
end else if TheOwner is TLazProject then begin
|
||||||
AProject:=TLazProject(TheOwner);
|
AProject:=TLazProject(TheOwner);
|
||||||
if SearchLazDocFile(AProject.LazDocPaths,
|
if SearchFPDocFile(AProject.FPDocPaths,
|
||||||
ExtractFilePath(AProject.ProjectInfoFile),FirstIdentifier)='' then
|
ExtractFilePath(AProject.ProjectInfoFile),FirstIdentifier)='' then
|
||||||
begin
|
begin
|
||||||
// there is no fpdoc file for this identifier
|
// there is no fpdoc file for this identifier
|
||||||
@ -2089,15 +2089,15 @@ begin
|
|||||||
FPDocFilename:='';
|
FPDocFilename:='';
|
||||||
if ModuleOwner is TLazProject then begin
|
if ModuleOwner is TLazProject then begin
|
||||||
AProject:=TLazProject(ModuleOwner);
|
AProject:=TLazProject(ModuleOwner);
|
||||||
if (AProject.LazDocPaths<>'') then begin
|
if (AProject.FPDocPaths<>'') then begin
|
||||||
BaseDir:=ExtractFilePath(AProject.ProjectInfoFile);
|
BaseDir:=ExtractFilePath(AProject.ProjectInfoFile);
|
||||||
FPDocFilename:=FindFPDocFilename(BaseDir,AProject.LazDocPaths,AUnitName);
|
FPDocFilename:=FindFPDocFilename(BaseDir,AProject.FPDocPaths,AUnitName);
|
||||||
end;
|
end;
|
||||||
end else if ModuleOwner is TLazPackage then begin
|
end else if ModuleOwner is TLazPackage then begin
|
||||||
Pkg:=TLazPackage(ModuleOwner);
|
Pkg:=TLazPackage(ModuleOwner);
|
||||||
if Pkg.LazDocPaths<>'' then begin
|
if Pkg.FPDocPaths<>'' then begin
|
||||||
BaseDir:=Pkg.Directory;
|
BaseDir:=Pkg.Directory;
|
||||||
FPDocFilename:=FindFPDocFilename(BaseDir,Pkg.LazDocPaths,AUnitName);
|
FPDocFilename:=FindFPDocFilename(BaseDir,Pkg.FPDocPaths,AUnitName);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//DebugLn(['TCodeHelpManager.GetLinkedFPDocNode FPDocFilename=',FPDocFilename]);
|
//DebugLn(['TCodeHelpManager.GetLinkedFPDocNode FPDocFilename=',FPDocFilename]);
|
||||||
@ -2221,14 +2221,14 @@ begin
|
|||||||
// get the declaration chain
|
// get the declaration chain
|
||||||
Result:=GetDeclarationChain(Code,X,Y,ListOfPCodeXYPosition,CacheWasUsed);
|
Result:=GetDeclarationChain(Code,X,Y,ListOfPCodeXYPosition,CacheWasUsed);
|
||||||
if Result<>chprSuccess then begin
|
if Result<>chprSuccess then begin
|
||||||
{$IFDEF VerboseLazDocFails}
|
{$IFDEF VerboseCodeHelpFails}
|
||||||
DebugLn(['TCodeHelpManager.GetElementChain GetDeclarationChain failed ',Code.Filename,' x=',x,' y=',y]);
|
DebugLn(['TCodeHelpManager.GetElementChain GetDeclarationChain failed ',Code.Filename,' x=',x,' y=',y]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if (not CacheWasUsed) and (not Complete) then exit(chprParsing);
|
if (not CacheWasUsed) and (not Complete) then exit(chprParsing);
|
||||||
|
|
||||||
{$IFDEF VerboseLazDoc}
|
{$IFDEF VerboseCodeHelp}
|
||||||
DebugLn(['TCodeHelpManager.GetElementChain init the element chain: ListOfPCodeXYPosition.Count=',ListOfPCodeXYPosition.Count,' ...']);
|
DebugLn(['TCodeHelpManager.GetElementChain init the element chain: ListOfPCodeXYPosition.Count=',ListOfPCodeXYPosition.Count,' ...']);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// init the element chain
|
// init the element chain
|
||||||
@ -2342,7 +2342,7 @@ begin
|
|||||||
//DumpExceptionBackTrace;
|
//DumpExceptionBackTrace;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$ifdef VerboseLazDoc}
|
{$ifdef VerboseCodeHelp}
|
||||||
debugln(['TCodeHelpManager.GetHTMLHint ',HTMLHint]);
|
debugln(['TCodeHelpManager.GetHTMLHint ',HTMLHint]);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
@ -2451,7 +2451,7 @@ begin
|
|||||||
or ((CTNode.Desc in [ctnProcedure,ctnProcedureHead])
|
or ((CTNode.Desc in [ctnProcedure,ctnProcedureHead])
|
||||||
and (CTTool.ProcNodeHasSpecifier(CTNode,psOVERRIDE)))
|
and (CTTool.ProcNodeHasSpecifier(CTNode,psOVERRIDE)))
|
||||||
then begin
|
then begin
|
||||||
{$ifdef VerboseLazDoc}
|
{$ifdef VerboseCodeHelp}
|
||||||
debugln(['TCodeHelpManager.GetHTMLHint searching for inherited of ',CTNode.DescAsString,' ',dbgs(XYPos)]);
|
debugln(['TCodeHelpManager.GetHTMLHint searching for inherited of ',CTNode.DescAsString,' ',dbgs(XYPos)]);
|
||||||
{$endif}
|
{$endif}
|
||||||
OldXYPos:=XYPos;
|
OldXYPos:=XYPos;
|
||||||
@ -2462,13 +2462,13 @@ begin
|
|||||||
or (CTNode=OldCTNode)
|
or (CTNode=OldCTNode)
|
||||||
or (CTNode=nil)
|
or (CTNode=nil)
|
||||||
then begin
|
then begin
|
||||||
{$ifdef VerboseLazDoc}
|
{$ifdef VerboseCodeHelp}
|
||||||
debugln(['TCodeHelpManager.GetHTMLHint inherited not found: ',dbgs(OldXYPos)]);
|
debugln(['TCodeHelpManager.GetHTMLHint inherited not found: ',dbgs(OldXYPos)]);
|
||||||
{$endif}
|
{$endif}
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
{$ifdef VerboseLazDoc}
|
{$ifdef VerboseCodeHelp}
|
||||||
debugln(['TCodeHelpManager.GetHTMLHint not searching inherited for ',CTNode.DescAsString]);
|
debugln(['TCodeHelpManager.GetHTMLHint not searching inherited for ',CTNode.DescAsString]);
|
||||||
{$endif}
|
{$endif}
|
||||||
break;
|
break;
|
||||||
@ -2504,7 +2504,7 @@ begin
|
|||||||
end else
|
end else
|
||||||
Result:=chprFailed;
|
Result:=chprFailed;
|
||||||
end;
|
end;
|
||||||
{$ifdef VerboseLazDoc}
|
{$ifdef VerboseCodeHelp}
|
||||||
debugln(['TCodeHelpManager.GetHTMLHint ',HTMLHint]);
|
debugln(['TCodeHelpManager.GetHTMLHint ',HTMLHint]);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
@ -307,8 +307,8 @@ type
|
|||||||
FAskForFilenameOnNewFile: boolean;
|
FAskForFilenameOnNewFile: boolean;
|
||||||
FLowercaseDefaultFilename: boolean;
|
FLowercaseDefaultFilename: boolean;
|
||||||
|
|
||||||
// lazdoc
|
// fpdoc
|
||||||
FLazDocPaths: string;
|
FFPDocPaths: string;
|
||||||
|
|
||||||
// language ID (see LazarusTranslations in translations.pas)
|
// language ID (see LazarusTranslations in translations.pas)
|
||||||
fLanguageID: string;
|
fLanguageID: string;
|
||||||
@ -554,8 +554,8 @@ type
|
|||||||
property LowercaseDefaultFilename: boolean read FLowercaseDefaultFilename
|
property LowercaseDefaultFilename: boolean read FLowercaseDefaultFilename
|
||||||
write FLowercaseDefaultFilename;
|
write FLowercaseDefaultFilename;
|
||||||
|
|
||||||
// lazdoc
|
// fpdoc
|
||||||
property LazDocPaths: string read FLazDocPaths write FLazDocPaths;
|
property FPDocPaths: string read FFPDocPaths write FFPDocPaths;
|
||||||
|
|
||||||
// language
|
// language
|
||||||
property LanguageID: string read fLanguageID write fLanguageID;
|
property LanguageID: string read fLanguageID write fLanguageID;
|
||||||
@ -593,7 +593,7 @@ function SimpleDirectoryCheck(const OldDir, NewDir,
|
|||||||
NotFoundErrMsg: string; out StopChecking: boolean): boolean;
|
NotFoundErrMsg: string; out StopChecking: boolean): boolean;
|
||||||
|
|
||||||
const
|
const
|
||||||
DefaultLazDocPath = '$(LazarusDir)/docs/xml/lcl';
|
DefaultFPDocPath = '$(LazarusDir)/docs/xml/lcl';
|
||||||
DefaultMsgViewFocus = {$IFDEF Windows}true{$ELSE}false{$ENDIF};
|
DefaultMsgViewFocus = {$IFDEF Windows}true{$ELSE}false{$ENDIF};
|
||||||
MaxComboBoxCount: integer = 20;
|
MaxComboBoxCount: integer = 20;
|
||||||
EnvOptsConfFileName = 'environmentoptions.xml';
|
EnvOptsConfFileName = 'environmentoptions.xml';
|
||||||
@ -835,8 +835,8 @@ begin
|
|||||||
(* TODO: maybe revert relations. Create this in Debugger, and call environmentoptions for the configstore only? *)
|
(* TODO: maybe revert relations. Create this in Debugger, and call environmentoptions for the configstore only? *)
|
||||||
FDebuggerConfig := TDebuggerConfigStore.Create;
|
FDebuggerConfig := TDebuggerConfigStore.Create;
|
||||||
|
|
||||||
// lazdoc
|
// FPdoc
|
||||||
FLazDocPaths:=SetDirSeparators(DefaultLazDocPath);
|
FFPDocPaths:=SetDirSeparators(DefaultFPDocPath);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TEnvironmentOptions.Destroy;
|
destructor TEnvironmentOptions.Destroy;
|
||||||
@ -1242,10 +1242,10 @@ begin
|
|||||||
FLowercaseDefaultFilename:=XMLConfig.GetValue(
|
FLowercaseDefaultFilename:=XMLConfig.GetValue(
|
||||||
Path+'LowercaseDefaultFilename/Value',true);
|
Path+'LowercaseDefaultFilename/Value',true);
|
||||||
|
|
||||||
//lazdoc
|
// fpdoc
|
||||||
FLazDocPaths := XMLConfig.GetValue(Path+'LazDoc/Paths', DefaultLazDocPath);
|
FFPDocPaths := XMLConfig.GetValue(Path+'LazDoc/Paths', DefaultFPDocPath);
|
||||||
if FileVersion<=105 then
|
if FileVersion<=105 then
|
||||||
FLazDocPaths:=LineBreaksToDelimiter(FLazDocPaths,';');
|
FFPDocPaths:=LineBreaksToDelimiter(FFPDocPaths,';');
|
||||||
|
|
||||||
// 'new items'
|
// 'new items'
|
||||||
FNewUnitTemplate:=XMLConfig.GetValue(Path+'New/UnitTemplate/Value',FileDescNamePascalUnit);
|
FNewUnitTemplate:=XMLConfig.GetValue(Path+'New/UnitTemplate/Value',FileDescNamePascalUnit);
|
||||||
@ -1554,8 +1554,8 @@ begin
|
|||||||
XMLConfig.SetDeleteValue(Path+'LowercaseDefaultFilename/Value',
|
XMLConfig.SetDeleteValue(Path+'LowercaseDefaultFilename/Value',
|
||||||
FLowercaseDefaultFilename,true);
|
FLowercaseDefaultFilename,true);
|
||||||
|
|
||||||
// lazdoc
|
// fpdoc
|
||||||
XMLConfig.SetDeleteValue(Path+'LazDoc/Paths',FLazDocPaths,DefaultLazDocPath);
|
XMLConfig.SetDeleteValue(Path+'LazDoc/Paths',FFPDocPaths,DefaultFPDocPath);
|
||||||
|
|
||||||
// 'new items'
|
// 'new items'
|
||||||
XMLConfig.SetDeleteValue(Path+'New/UnitTemplate/Value',FNewUnitTemplate,FileDescNamePascalUnit);
|
XMLConfig.SetDeleteValue(Path+'New/UnitTemplate/Value',FNewUnitTemplate,FileDescNamePascalUnit);
|
||||||
|
@ -176,8 +176,8 @@ type
|
|||||||
procedure UpdateCaption;
|
procedure UpdateCaption;
|
||||||
procedure UpdateValueControls;
|
procedure UpdateValueControls;
|
||||||
procedure UpdateInheritedControls;
|
procedure UpdateInheritedControls;
|
||||||
procedure OnLazDocChanging(Sender: TObject; LazDocFPFile: TLazFPDocFile);
|
procedure OnFPDocChanging(Sender: TObject; FPDocFPFile: TLazFPDocFile);
|
||||||
procedure OnLazDocChanged(Sender: TObject; LazDocFPFile: TLazFPDocFile);
|
procedure OnFPDocChanged(Sender: TObject; FPDocFPFile: TLazFPDocFile);
|
||||||
procedure LoadGUIValues(Element: TCodeHelpElement);
|
procedure LoadGUIValues(Element: TCodeHelpElement);
|
||||||
procedure MoveToInherited(Element: TCodeHelpElement);
|
procedure MoveToInherited(Element: TCodeHelpElement);
|
||||||
function GetDefaultDocFile(CreateIfNotExists: Boolean = False): TLazFPDocFile;
|
function GetDefaultDocFile(CreateIfNotExists: Boolean = False): TLazFPDocFile;
|
||||||
@ -285,8 +285,8 @@ begin
|
|||||||
|
|
||||||
Reset;
|
Reset;
|
||||||
|
|
||||||
CodeHelpBoss.AddHandlerOnChanging(@OnLazDocChanging);
|
CodeHelpBoss.AddHandlerOnChanging(@OnFPDocChanging);
|
||||||
CodeHelpBoss.AddHandlerOnChanged(@OnLazDocChanged);
|
CodeHelpBoss.AddHandlerOnChanged(@OnFPDocChanged);
|
||||||
Application.AddOnIdleHandler(@ApplicationIdle);
|
Application.AddOnIdleHandler(@ApplicationIdle);
|
||||||
|
|
||||||
Name := NonModalIDEWindowNames[nmiwFPDocEditorName];
|
Name := NonModalIDEWindowNames[nmiwFPDocEditorName];
|
||||||
@ -700,7 +700,7 @@ begin
|
|||||||
end else
|
end else
|
||||||
Caption := strCaption + lisCodeHelpNoTagCaption;
|
Caption := strCaption + lisCodeHelpNoTagCaption;
|
||||||
{$IFDEF VerboseCodeHelp}
|
{$IFDEF VerboseCodeHelp}
|
||||||
DebugLn(['TLazDocForm.UpdateCaption ',Caption]);
|
DebugLn(['TFPDocEditor.UpdateCaption ',Caption]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -788,20 +788,20 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// start getting the lazdoc element chain
|
// start getting the fpdoc element chain
|
||||||
LDResult:=CodeHelpBoss.GetElementChain(Code,CaretXY.X,CaretXY.Y,true,
|
LDResult:=CodeHelpBoss.GetElementChain(Code,CaretXY.X,CaretXY.Y,true,
|
||||||
NewChain,CacheWasUsed);
|
NewChain,CacheWasUsed);
|
||||||
case LDResult of
|
case LDResult of
|
||||||
chprParsing:
|
chprParsing:
|
||||||
begin
|
begin
|
||||||
Include(FFlags,fpdefChainNeedsUpdate);
|
Include(FFlags,fpdefChainNeedsUpdate);
|
||||||
DebugLn(['TFPDocEditForm.UpdateChain ToDo: still parsing LazDocBoss.GetElementChain for ',fSourceFilename,' ',dbgs(CaretXY)]);
|
DebugLn(['TFPDocEditForm.UpdateChain ToDo: still parsing CodeHelpBoss.GetElementChain for ',fSourceFilename,' ',dbgs(CaretXY)]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
chprFailed:
|
chprFailed:
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseLazDocFails}
|
{$IFDEF VerboseFPDocFails}
|
||||||
DebugLn(['TFPDocEditForm.UpdateChain failed LazDocBoss.GetElementChain for ',fSourceFilename,' ',dbgs(CaretXY)]);
|
DebugLn(['TFPDocEditForm.UpdateChain failed CodeHelpBoss.GetElementChain for ',fSourceFilename,' ',dbgs(CaretXY)]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -827,18 +827,18 @@ begin
|
|||||||
OpenXMLButton.Hint:='';
|
OpenXMLButton.Hint:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPDocEditor.OnLazDocChanging(Sender: TObject;
|
procedure TFPDocEditor.OnFPDocChanging(Sender: TObject;
|
||||||
LazDocFPFile: TLazFPDocFile);
|
FPDocFPFile: TLazFPDocFile);
|
||||||
begin
|
begin
|
||||||
if fpdefWriting in FFlags then exit;
|
if fpdefWriting in FFlags then exit;
|
||||||
if (fChain<>nil) and (fChain.IndexOfFile(LazDocFPFile)>=0) then
|
if (fChain<>nil) and (fChain.IndexOfFile(FPDocFPFile)>=0) then
|
||||||
InvalidateChain
|
InvalidateChain
|
||||||
else if (fDocFile<>nil) and (fDocFile=LazDocFPFile) then
|
else if (fDocFile<>nil) and (fDocFile=FPDocFPFile) then
|
||||||
Include(FFlags,fpdefTopicNeedsUpdate);
|
Include(FFlags,fpdefTopicNeedsUpdate);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPDocEditor.OnLazDocChanged(Sender: TObject;
|
procedure TFPDocEditor.OnFPDocChanged(Sender: TObject;
|
||||||
LazDocFPFile: TLazFPDocFile);
|
FPDocFPFile: TLazFPDocFile);
|
||||||
begin
|
begin
|
||||||
if fpdefWriting in FFlags then exit;
|
if fpdefWriting in FFlags then exit;
|
||||||
|
|
||||||
@ -1266,7 +1266,7 @@ begin
|
|||||||
if fChain.DocFile=TopicDocFile then
|
if fChain.DocFile=TopicDocFile then
|
||||||
TopicChanged:=false;
|
TopicChanged:=false;
|
||||||
end else begin
|
end else begin
|
||||||
DebugLn(['TLazDocForm.Save WriteNode FAILED']);
|
DebugLn(['TFPDocEditor.Save WriteNode FAILED']);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if TopicChanged then begin
|
if TopicChanged then begin
|
||||||
@ -1351,7 +1351,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=Test;
|
Result:=Test;
|
||||||
if not Test then exit;
|
if not Test then exit;
|
||||||
DebugLn(['TLazDocForm.WriteNode ERROR ',Msg]);
|
DebugLn(['TFPDocEditor.WriteNode ERROR ',Msg]);
|
||||||
if Interactive then begin;
|
if Interactive then begin;
|
||||||
if Element.FPDocFile<>nil then
|
if Element.FPDocFile<>nil then
|
||||||
CurName:=Element.FPDocFile.Filename
|
CurName:=Element.FPDocFile.Filename
|
||||||
@ -1570,6 +1570,6 @@ end;
|
|||||||
|
|
||||||
initialization
|
initialization
|
||||||
// then the items
|
// then the items
|
||||||
{$I lazdoc.lrs}
|
{$I fpdocediticons.lrs}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -112,7 +112,7 @@ begin
|
|||||||
if (Position<0) or (Position>=CodeToolBoss.IdentifierList.GetFilteredCount) then
|
if (Position<0) or (Position>=CodeToolBoss.IdentifierList.GetFilteredCount) then
|
||||||
exit;
|
exit;
|
||||||
Item:=CodeToolBoss.IdentifierList.FilteredItems[Position];
|
Item:=CodeToolBoss.IdentifierList.FilteredItems[Position];
|
||||||
DebugLn(['TFPDocHintProvider.ReadLazDocData Identifier=',Item.Identifier]);
|
DebugLn(['TFPDocHintProvider.DoUpdateHint Identifier=',Item.Identifier]);
|
||||||
try
|
try
|
||||||
FBaseURL:='';
|
FBaseURL:='';
|
||||||
FHTMLHint:='<HTML><BODY>No help available.</BODY></HTML>';
|
FHTMLHint:='<HTML><BODY>No help available.</BODY></HTML>';
|
||||||
@ -126,15 +126,15 @@ begin
|
|||||||
[chhoDeclarationHeader],
|
[chhoDeclarationHeader],
|
||||||
FBaseURL,FHTMLHint,CacheWasUsed);
|
FBaseURL,FHTMLHint,CacheWasUsed);
|
||||||
if HelpResult<>chprSuccess then begin
|
if HelpResult<>chprSuccess then begin
|
||||||
DebugLn(['TFPDocHintProvider.ReadLazDocData FAILED Unit=',Item.Identifier]);
|
DebugLn(['TFPDocHintProvider.DoUpdateHint FAILED Unit=',Item.Identifier]);
|
||||||
end;
|
end;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
DebugLn(['TFPDocHintProvider.ReadLazDocData FAILED no node ',NodeDescriptionAsString(Item.DefaultDesc),' Identifier=',Item.Identifier]);
|
DebugLn(['TFPDocHintProvider.DoUpdateHint FAILED no node ',NodeDescriptionAsString(Item.DefaultDesc),' Identifier=',Item.Identifier]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if (Item.Tool.Scanner=nil) then exit;
|
if (Item.Tool.Scanner=nil) then exit;
|
||||||
//DebugLn(['TFPDocHintProvider.ReadLazDocData Src=',copy(Item.Tool.Src,Node.StartPos,30),' ',Node.DescAsString]);
|
//DebugLn(['TFPDocHintProvider.DoUpdateHint Src=',copy(Item.Tool.Src,Node.StartPos,30),' ',Node.DescAsString]);
|
||||||
|
|
||||||
// search the position of the identifier, not the keyword
|
// search the position of the identifier, not the keyword
|
||||||
CleanPos:=Node.StartPos;
|
CleanPos:=Node.StartPos;
|
||||||
@ -153,15 +153,15 @@ begin
|
|||||||
|
|
||||||
// get help text
|
// get help text
|
||||||
if (not Item.Tool.CleanPosToCaret(CleanPos,Caret)) then begin
|
if (not Item.Tool.CleanPosToCaret(CleanPos,Caret)) then begin
|
||||||
DebugLn(['TFPDocHintProvider.ReadLazDocData FAILED CleanPosToCaret Tool=',Item.Tool.MainFilename,' CleanPos=',CleanPos,' SrcLen=',Item.Tool.SrcLen]);
|
DebugLn(['TFPDocHintProvider.DoUpdateHint FAILED CleanPosToCaret Tool=',Item.Tool.MainFilename,' CleanPos=',CleanPos,' SrcLen=',Item.Tool.SrcLen]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
//DebugLn(['TFPDocHintProvider.ReadLazDocData ',Item.Identifier,' ',Item.Tool.MainFilename,' ',Caret.Code.Filename,' ',Caret.X,',',Caret.Y]);
|
//DebugLn(['TFPDocHintProvider.DoUpdateHint ',Item.Identifier,' ',Item.Tool.MainFilename,' ',Caret.Code.Filename,' ',Caret.X,',',Caret.Y]);
|
||||||
HelpResult:=CodeHelpBoss.GetHTMLHint(Caret.Code,Caret.X,Caret.Y,
|
HelpResult:=CodeHelpBoss.GetHTMLHint(Caret.Code,Caret.X,Caret.Y,
|
||||||
[chhoDeclarationHeader],
|
[chhoDeclarationHeader],
|
||||||
FBaseURL,FHTMLHint,CacheWasUsed);
|
FBaseURL,FHTMLHint,CacheWasUsed);
|
||||||
if HelpResult<>chprSuccess then begin
|
if HelpResult<>chprSuccess then begin
|
||||||
DebugLn(['TFPDocHintProvider.ReadLazDocData FAILED Identifier=',Item.Identifier]);
|
DebugLn(['TFPDocHintProvider.DoUpdateHint FAILED Identifier=',Item.Identifier]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
@ -353,7 +353,7 @@ var
|
|||||||
begin
|
begin
|
||||||
for i:=0 to PackageGraph.Count-1 do begin
|
for i:=0 to PackageGraph.Count-1 do begin
|
||||||
Pkg:=PackageGraph.Packages[i];
|
Pkg:=PackageGraph.Packages[i];
|
||||||
if Pkg.LazDocPaths='' then continue;
|
if Pkg.FPDocPaths='' then continue;
|
||||||
if (SysUtils.CompareText(Prefix,copy(Pkg.Name,1,length(Prefix)))=0) then
|
if (SysUtils.CompareText(Prefix,copy(Pkg.Name,1,length(Prefix)))=0) then
|
||||||
fItems.AddPackage(Pkg);
|
fItems.AddPackage(Pkg);
|
||||||
end;
|
end;
|
||||||
|
@ -67,7 +67,7 @@ end;
|
|||||||
|
|
||||||
procedure TFpDocOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
procedure TFpDocOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||||
begin
|
begin
|
||||||
LazDocPathsGroupBox.Caption := lisCodeHelpPathsGroupBox;
|
LazDocPathsGroupBox.Caption := lisCodeHelpGroupBox;
|
||||||
LazDocAddPathButton.Caption := lisCodeHelpAddPathButton;
|
LazDocAddPathButton.Caption := lisCodeHelpAddPathButton;
|
||||||
LazDocDeletePathButton.Caption := lisCodeHelpDeletePathButton;
|
LazDocDeletePathButton.Caption := lisCodeHelpDeletePathButton;
|
||||||
|
|
||||||
@ -77,13 +77,13 @@ end;
|
|||||||
procedure TFpDocOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TFpDocOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TEnvironmentOptions do
|
with AOptions as TEnvironmentOptions do
|
||||||
SplitString(LazDocPaths, ';', LazDocListBox.Items);
|
SplitString(FPDocPaths, ';', LazDocListBox.Items);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFpDocOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TFpDocOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TEnvironmentOptions do
|
with AOptions as TEnvironmentOptions do
|
||||||
LazDocPaths := StringListToText(LazDocListBox.Items, ';', true);
|
FPDocPaths := StringListToText(LazDocListBox.Items, ';', true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFpDocOptionsFrame.LazDocAddPathButtonClick(Sender: TObject);
|
procedure TFpDocOptionsFrame.LazDocAddPathButtonClick(Sender: TObject);
|
||||||
|
@ -90,13 +90,13 @@ end;
|
|||||||
procedure TProjectLazDocOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TProjectLazDocOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProject do
|
with AOptions as TProject do
|
||||||
SplitString(LazDocPaths, ';', LazDocListBox.Items, True);
|
SplitString(FPDocPaths, ';', LazDocListBox.Items, True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectLazDocOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TProjectLazDocOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
begin
|
begin
|
||||||
with AOptions as TProject do
|
with AOptions as TProject do
|
||||||
LazDocPaths := StringListToText(LazDocListBox.Items, ';', True);
|
FPDocPaths := StringListToText(LazDocListBox.Items, ';', True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TProjectLazDocOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TProjectLazDocOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
|
@ -3331,6 +3331,8 @@ resourcestring
|
|||||||
// path edit dialog
|
// path edit dialog
|
||||||
lisPathEditSelectDirectory = 'Select directory';
|
lisPathEditSelectDirectory = 'Select directory';
|
||||||
lisPathEditSearchPaths = 'Search paths:';
|
lisPathEditSearchPaths = 'Search paths:';
|
||||||
|
lisPckSearchPathsForFpdocXmlFilesMultiplePathsMustBeSepa = 'Search paths for'
|
||||||
|
+' fpdoc xml files. Multiple paths must be separated by semicolon.';
|
||||||
lisPathEditMovePathDown = 'Move path down';
|
lisPathEditMovePathDown = 'Move path down';
|
||||||
lisPathEditMovePathUp = 'Move path up';
|
lisPathEditMovePathUp = 'Move path up';
|
||||||
lisPathEditBrowse = 'Browse';
|
lisPathEditBrowse = 'Browse';
|
||||||
@ -3422,9 +3424,9 @@ resourcestring
|
|||||||
lisLDTheUnitIsNotOwnedBeAnyPackageOrProjectPleaseAddThe = 'The unit %s is '
|
lisLDTheUnitIsNotOwnedBeAnyPackageOrProjectPleaseAddThe = 'The unit %s is '
|
||||||
+'not owned be any package or project.%sPlease add the unit to a package '
|
+'not owned be any package or project.%sPlease add the unit to a package '
|
||||||
+'or project.%sUnable to create the fpdoc file.';
|
+'or project.%sUnable to create the fpdoc file.';
|
||||||
lisLDNoValidLazDocPath = 'No valid LazDoc path';
|
lisLDNoValidFPDocPath = 'No valid FPDoc path';
|
||||||
lisLDDoesNotHaveAnyValidLazDocPathUnableToCreateTheFpdo = '%s does not have '
|
lisLDDoesNotHaveAnyValidFPDocPathUnableToCreateTheFpdo = '%s does not have '
|
||||||
+'any valid LazDoc path.%sUnable to create the fpdoc file for %s';
|
+'any valid FPDoc path.%sUnable to create the fpdoc file for %s';
|
||||||
lisErrorReadingXML = 'Error reading XML';
|
lisErrorReadingXML = 'Error reading XML';
|
||||||
lisErrorReadingXmlFile = 'Error reading xml file %s%s%s%s%s';
|
lisErrorReadingXmlFile = 'Error reading xml file %s%s%s%s%s';
|
||||||
lisPkgThisFileIsNotInAnyLoadedPackage = 'This file is not in any loaded package.';
|
lisPkgThisFileIsNotInAnyLoadedPackage = 'This file is not in any loaded package.';
|
||||||
@ -4136,6 +4138,8 @@ resourcestring
|
|||||||
lisPckOptsAutomaticallyRebuildAsNeeded = 'Automatically rebuild as needed';
|
lisPckOptsAutomaticallyRebuildAsNeeded = 'Automatically rebuild as needed';
|
||||||
lisPckOptsAutoRebuildWhenRebuildingAll = 'Auto rebuild when rebuilding all';
|
lisPckOptsAutoRebuildWhenRebuildingAll = 'Auto rebuild when rebuilding all';
|
||||||
lisPckOptsManualCompilationNeverAutomatically = 'Manual compilation (never automatically)';
|
lisPckOptsManualCompilationNeverAutomatically = 'Manual compilation (never automatically)';
|
||||||
|
lisPckPackage = 'Package:';
|
||||||
|
lisPckClearToUseThePackageName = 'Clear to use the package name';
|
||||||
lisPckOptsAddPathsToDependentPackagesProjects = 'Add paths to dependent packages/projects';
|
lisPckOptsAddPathsToDependentPackagesProjects = 'Add paths to dependent packages/projects';
|
||||||
lisPckOptsInclude = 'Include';
|
lisPckOptsInclude = 'Include';
|
||||||
lisPckOptsObject = 'Object';
|
lisPckOptsObject = 'Object';
|
||||||
@ -4457,7 +4461,7 @@ resourcestring
|
|||||||
lisEONOTEOnlyAbsolutePathsAreSupportedNow = 'NOTE: only absolute paths are supported now';
|
lisEONOTEOnlyAbsolutePathsAreSupportedNow = 'NOTE: only absolute paths are supported now';
|
||||||
lisCodeHelpConfirmreplace = 'Confirm replace';
|
lisCodeHelpConfirmreplace = 'Confirm replace';
|
||||||
lisCodeHelpReplaceButton = 'Replace';
|
lisCodeHelpReplaceButton = 'Replace';
|
||||||
lisCodeHelpPathsGroupBox = 'FPDoc files path';
|
lisCodeHelpGroupBox = 'FPDoc settings';
|
||||||
lisCodeHelpHintBoldFormat = 'Insert bold formatting tag';
|
lisCodeHelpHintBoldFormat = 'Insert bold formatting tag';
|
||||||
lisCodeHelpHintItalicFormat = 'Insert italic formatting tag';
|
lisCodeHelpHintItalicFormat = 'Insert italic formatting tag';
|
||||||
lisCodeHelpHintUnderlineFormat = 'Insert underline formatting tag';
|
lisCodeHelpHintUnderlineFormat = 'Insert underline formatting tag';
|
||||||
|
@ -2853,9 +2853,9 @@ begin
|
|||||||
xmlconfig.SetDeleteValue(Path+'General/Title/Value', Title,'');
|
xmlconfig.SetDeleteValue(Path+'General/Title/Value', Title,'');
|
||||||
xmlconfig.SetDeleteValue(Path+'General/UseAppBundle/Value', UseAppBundle, True);
|
xmlconfig.SetDeleteValue(Path+'General/UseAppBundle/Value', UseAppBundle, True);
|
||||||
|
|
||||||
// lazdoc
|
// fpdoc
|
||||||
xmlconfig.SetDeleteValue(Path+'LazDoc/Paths',
|
xmlconfig.SetDeleteValue(Path+'LazDoc/Paths',
|
||||||
SwitchPathDelims(CreateRelativeSearchPath(LazDocPaths,ProjectDirectory),
|
SwitchPathDelims(CreateRelativeSearchPath(FPDocPaths,ProjectDirectory),
|
||||||
fCurStorePathDelim),
|
fCurStorePathDelim),
|
||||||
'');
|
'');
|
||||||
|
|
||||||
@ -3427,9 +3427,9 @@ begin
|
|||||||
Path+'General/AutoCreateForms/Value', true);
|
Path+'General/AutoCreateForms/Value', true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Lazdoc
|
// fpdoc
|
||||||
if not LoadParts then begin
|
if not LoadParts then begin
|
||||||
LazDocPaths := SwitchPathDelims(xmlconfig.GetValue(Path+'LazDoc/Paths', ''),
|
FPDocPaths := SwitchPathDelims(xmlconfig.GetValue(Path+'LazDoc/Paths', ''),
|
||||||
fPathDelimChanged);
|
fPathDelimChanged);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user