mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-24 01:03:56 +02:00
IDE: project: added option to set the fpdoc package name
git-svn-id: trunk@34826 -
This commit is contained in:
parent
9fbbbadd09
commit
817dce013f
@ -156,7 +156,8 @@ type
|
||||
public
|
||||
CodeContext: TFindContext;
|
||||
CodeXYPos: TCodeXYPosition;
|
||||
ElementOwnerName: string;// the 'fpdoc package' = the name of the lazarus package or project
|
||||
ElementOwnerName: string;// the name of the lazarus package or project
|
||||
ElementFPDocPackageName: string;
|
||||
ElementUnitName: string;
|
||||
ElementUnitFileName: string;
|
||||
ElementName: string;
|
||||
@ -1858,7 +1859,7 @@ begin
|
||||
if TheOwner is TLazPackage then
|
||||
Result:=TLazPackage(TheOwner).GetFPDocPackageName
|
||||
else if TheOwner is TLazProject then
|
||||
Result:=ExtractFileNameOnly(TLazProject(TheOwner).ProjectInfoFile)
|
||||
Result:=TLazProject(TheOwner).GetFPDocPackageName
|
||||
else if TheOwner=LazarusHelp then
|
||||
Result:=IDEProjectName
|
||||
else
|
||||
@ -1935,7 +1936,7 @@ begin
|
||||
if AddUnit then
|
||||
Result:=DefaultUnitName+'.'+Result;
|
||||
end;
|
||||
Result:='#'+GetModuleOwnerName(TheOwner)+'.'+Result;
|
||||
Result:='#'+GetFPDocPackageNameByOwner(TheOwner)+'.'+Result;
|
||||
end;
|
||||
|
||||
function TCodeHelpManager.CodeNodeToElementName(Tool: TFindDeclarationTool;
|
||||
@ -2287,6 +2288,7 @@ begin
|
||||
FPDocFilename:=GetFPDocFilenameForSource(CHElement.ElementUnitFileName,
|
||||
false,CacheWasUsed,AnOwner);
|
||||
CHElement.ElementOwnerName:=GetModuleOwnerName(AnOwner);
|
||||
CHElement.ElementFPDocPackageName:=GetFPDocPackageNameByOwner(AnOwner);
|
||||
//DebugLn(['TCodeHelpManager.GetElementChain FPDocFilename=',FPDocFilename]);
|
||||
if (not CacheWasUsed) and (not Complete) then exit(chprParsing);
|
||||
|
||||
@ -3075,7 +3077,7 @@ end;
|
||||
|
||||
procedure TCodeHelpElement.WriteDebugReport;
|
||||
begin
|
||||
DebugLn([' ',CodeXYPos.Code.Filename,' X=',CodeXYPos.X,' Y=',CodeXYPos.Y,' ElementOwnerName=',ElementOwnerName,' ElementUnitName=',ElementUnitName,' ElementUnitFileName=',ElementUnitFileName,' ElementName=',ElementName]);
|
||||
DebugLn([' ',CodeXYPos.Code.Filename,' X=',CodeXYPos.X,' Y=',CodeXYPos.Y,' ElementOwnerName=',ElementOwnerName,' ElementFPDocPackageName=',ElementFPDocPackageName,' ElementUnitName=',ElementUnitName,' ElementUnitFileName=',ElementUnitFileName,' ElementName=',ElementName]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -396,7 +396,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
CHElement:=Chain[0];
|
||||
DebugLn(['GatherFPDocReferences OwnerName=',CHElement.ElementOwnerName,' Name=',CHElement.ElementName]);
|
||||
DebugLn(['GatherFPDocReferences OwnerName=',CHElement.ElementOwnerName,' FPDocPkg=',CHElement.ElementFPDocPackageName,' Name=',CHElement.ElementName]);
|
||||
|
||||
// search FPDoc files
|
||||
AVLNode:=FPDocFilenames.Tree.FindLowest;
|
||||
@ -404,7 +404,7 @@ begin
|
||||
Item:=PStringToStringItem(AVLNode.Data);
|
||||
FPDocFilename:=Item^.Name;
|
||||
Result:=GatherReferencesInFPDocFile(
|
||||
CHElement.ElementOwnerName,CHElement.ElementUnitName,
|
||||
CHElement.ElementFPDocPackageName,CHElement.ElementUnitName,
|
||||
CHElement.ElementName,
|
||||
FPDocFilename,ListOfLazFPDocNode);
|
||||
if Result<>mrOk then exit;
|
||||
|
@ -185,7 +185,7 @@ type
|
||||
function CreateElement(Element: TCodeHelpElement): Boolean;
|
||||
procedure UpdateButtons;
|
||||
function GetCurrentUnitName: string;
|
||||
function GetCurrentModuleName: string;
|
||||
function GetCurrentOwnerName: string;
|
||||
procedure JumpToError(Item : TFPDocItem; LineCol: TPoint);
|
||||
procedure OpenXML;
|
||||
function GUIModified: boolean;
|
||||
@ -999,7 +999,7 @@ begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TFPDocEditor.GetCurrentModuleName: string;
|
||||
function TFPDocEditor.GetCurrentOwnerName: string;
|
||||
begin
|
||||
if (fChain<>nil) and (fChain.Count>0) then
|
||||
Result:=fChain[0].ElementOwnerName
|
||||
@ -1509,8 +1509,8 @@ begin
|
||||
Link:=Element.ElementName;
|
||||
if Element.ElementUnitName<>'' then begin
|
||||
Link:=Element.ElementUnitName+'.'+Link;
|
||||
if Element.ElementOwnerName<>'' then
|
||||
Link:='#'+Element.ElementOwnerName+'.'+Link;
|
||||
if Element.ElementFPDocPackageName<>'' then
|
||||
Link:='#'+Element.ElementFPDocPackageName+'.'+Link;
|
||||
end;
|
||||
if Link<>LinkEdit.Text then begin
|
||||
LinkEdit.Text:=Link;
|
||||
|
@ -1,4 +1,4 @@
|
||||
inherited ProjectLazDocOptionsFrame: TProjectLazDocOptionsFrame
|
||||
inherited ProjectFPDocOptionsFrame: TProjectFPDocOptionsFrame
|
||||
Height = 269
|
||||
Width = 478
|
||||
ClientHeight = 269
|
||||
@ -6,89 +6,132 @@ inherited ProjectLazDocOptionsFrame: TProjectLazDocOptionsFrame
|
||||
TabOrder = 0
|
||||
DesignLeft = 422
|
||||
DesignTop = 407
|
||||
object LazDocListBox: TListBox[0]
|
||||
object FPDocPackageNameLabel: TLabel[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 108
|
||||
Top = 0
|
||||
Width = 478
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ItemHeight = 0
|
||||
OnSelectionChange = LazDocListBoxSelectionChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object LazDocPathEdit: TEdit[1]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = LazDocListBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = LazDocBrowseButton
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 114
|
||||
Width = 454
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
OnChange = LazDocPathEditChange
|
||||
TabOrder = 1
|
||||
Text = 'LazDocPathEdit'
|
||||
end
|
||||
object LazDocBrowseButton: TButton[2]
|
||||
AnchorSideLeft.Control = LazDocPathEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LazDocPathEdit
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = LazDocPathEdit
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 454
|
||||
Height = 21
|
||||
Top = 114
|
||||
Width = 24
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
Caption = '...'
|
||||
OnClick = LazDocBrowseButtonClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object LazDocAddPathButton: TBitBtn[3]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = LazDocPathEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 141
|
||||
Width = 133
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'LazDocAddPathButton'
|
||||
Enabled = False
|
||||
NumGlyphs = 0
|
||||
OnClick = LazDocAddPathButtonClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object LazDocDeletePathButton: TBitBtn[4]
|
||||
AnchorSideLeft.Control = LazDocAddPathButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LazDocPathEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 139
|
||||
Height = 23
|
||||
Top = 141
|
||||
AnchorSideTop.Control = FPDocPackageNameEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 11
|
||||
Width = 145
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'LazDocDeletePathButton'
|
||||
Enabled = False
|
||||
NumGlyphs = 0
|
||||
OnClick = LazDocDeletePathButtonClick
|
||||
TabOrder = 4
|
||||
Caption = 'FPDocPackageNameLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object SelectDirectoryDialog: TSelectDirectoryDialog[5]
|
||||
object FPDocPackageNameEdit: TEdit[1]
|
||||
AnchorSideLeft.Control = FPDocPackageNameLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 157
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 120
|
||||
BorderSpacing.Around = 6
|
||||
OnEnter = FPDocPackageNameEditEnter
|
||||
OnExit = FPDocPackageNameEditExit
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
Text = 'FPDocPackageNameEdit'
|
||||
end
|
||||
object SearchPathsGroupBox: TGroupBox[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = FPDocPackageNameEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 233
|
||||
Top = 36
|
||||
Width = 478
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Caption = 'SearchPathsGroupBox'
|
||||
ClientHeight = 217
|
||||
ClientWidth = 474
|
||||
TabOrder = 1
|
||||
object PathsListBox: TListBox
|
||||
Left = 0
|
||||
Height = 108
|
||||
Top = 0
|
||||
Width = 474
|
||||
Align = alTop
|
||||
ItemHeight = 0
|
||||
OnSelectionChange = PathsListBoxSelectionChange
|
||||
ScrollWidth = 472
|
||||
TabOrder = 0
|
||||
TopIndex = -1
|
||||
end
|
||||
object PathEdit: TEdit
|
||||
AnchorSideLeft.Control = SearchPathsGroupBox
|
||||
AnchorSideTop.Control = PathsListBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = BrowseButton
|
||||
Left = 0
|
||||
Height = 24
|
||||
Top = 114
|
||||
Width = 450
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
OnChange = PathEditChange
|
||||
TabOrder = 1
|
||||
Text = 'PathEdit'
|
||||
end
|
||||
object AddPathButton: TBitBtn
|
||||
AnchorSideLeft.Control = SearchPathsGroupBox
|
||||
AnchorSideTop.Control = PathEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 26
|
||||
Top = 144
|
||||
Width = 94
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AddPathButton'
|
||||
Enabled = False
|
||||
NumGlyphs = 0
|
||||
OnClick = AddPathButtonClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object DeletePathButton: TBitBtn
|
||||
AnchorSideLeft.Control = AddPathButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = PathEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 100
|
||||
Height = 26
|
||||
Top = 144
|
||||
Width = 109
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'DeletePathButton'
|
||||
Enabled = False
|
||||
NumGlyphs = 0
|
||||
OnClick = DeletePathButtonClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object BrowseButton: TButton
|
||||
AnchorSideLeft.Control = PathEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = PathEdit
|
||||
AnchorSideRight.Control = SearchPathsGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = PathEdit
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 450
|
||||
Height = 24
|
||||
Top = 114
|
||||
Width = 24
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
Caption = '...'
|
||||
OnClick = BrowseButtonClick
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
object SelectDirectoryDialog: TSelectDirectoryDialog[3]
|
||||
FilterIndex = 0
|
||||
left = 116
|
||||
top = 241
|
||||
left = 370
|
||||
end
|
||||
end
|
||||
|
@ -10,22 +10,26 @@ uses
|
||||
|
||||
type
|
||||
|
||||
{ TProjectLazDocOptionsFrame }
|
||||
{ TProjectFPDocOptionsFrame }
|
||||
|
||||
TProjectLazDocOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
LazDocAddPathButton: TBitBtn;
|
||||
LazDocBrowseButton: TButton;
|
||||
LazDocDeletePathButton: TBitBtn;
|
||||
LazDocListBox: TListBox;
|
||||
LazDocPathEdit: TEdit;
|
||||
TProjectFPDocOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
AddPathButton: TBitBtn;
|
||||
BrowseButton: TButton;
|
||||
DeletePathButton: TBitBtn;
|
||||
FPDocPackageNameEdit: TEdit;
|
||||
FPDocPackageNameLabel: TLabel;
|
||||
PathsListBox: TListBox;
|
||||
PathEdit: TEdit;
|
||||
SearchPathsGroupBox: TGroupBox;
|
||||
SelectDirectoryDialog: TSelectDirectoryDialog;
|
||||
procedure LazDocAddPathButtonClick(Sender: TObject);
|
||||
procedure LazDocBrowseButtonClick(Sender: TObject);
|
||||
procedure LazDocDeletePathButtonClick(Sender: TObject);
|
||||
procedure LazDocListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure LazDocPathEditChange(Sender: TObject);
|
||||
procedure AddPathButtonClick(Sender: TObject);
|
||||
procedure BrowseButtonClick(Sender: TObject);
|
||||
procedure DeletePathButtonClick(Sender: TObject);
|
||||
procedure FPDocPackageNameEditEnter(Sender: TObject);
|
||||
procedure FPDocPackageNameEditExit(Sender: TObject);
|
||||
procedure PathsListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure PathEditChange(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
function GetTitle: string; override;
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||
@ -38,74 +42,98 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TProjectLazDocOptionsFrame }
|
||||
{ TProjectFPDocOptionsFrame }
|
||||
|
||||
function TProjectLazDocOptionsFrame.GetTitle: string;
|
||||
function TProjectFPDocOptionsFrame.GetTitle: string;
|
||||
begin
|
||||
Result := lisFPDocEditor;
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||
procedure TProjectFPDocOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||
begin
|
||||
LazDocAddPathButton.Caption := lisCodeHelpAddPathButton;
|
||||
LazDocDeletePathButton.Caption := lisCodeHelpDeletePathButton;
|
||||
LazDocDeletePathButton.LoadGlyphFromLazarusResource('laz_delete');
|
||||
LazDocAddPathButton.LoadGlyphFromLazarusResource('laz_add');
|
||||
FPDocPackageNameEdit.Hint:=lisFPDocPackageNameDefaultIsProjectFileName;
|
||||
FPDocPackageNameLabel.Caption:=lisFPDocPackageName;
|
||||
AddPathButton.Caption := lisCodeHelpAddPathButton;
|
||||
DeletePathButton.Caption := lisCodeHelpDeletePathButton;
|
||||
DeletePathButton.LoadGlyphFromLazarusResource('laz_delete');
|
||||
AddPathButton.LoadGlyphFromLazarusResource('laz_add');
|
||||
|
||||
LazDocPathEdit.Clear;
|
||||
PathEdit.Clear;
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.LazDocBrowseButtonClick(Sender: TObject);
|
||||
procedure TProjectFPDocOptionsFrame.BrowseButtonClick(Sender: TObject);
|
||||
begin
|
||||
if SelectDirectoryDialog.Execute then
|
||||
LazDocPathEdit.Text := SelectDirectoryDialog.FileName;
|
||||
PathEdit.Text := SelectDirectoryDialog.FileName;
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.LazDocAddPathButtonClick(Sender: TObject);
|
||||
procedure TProjectFPDocOptionsFrame.AddPathButtonClick(Sender: TObject);
|
||||
begin
|
||||
if LazDocPathEdit.Text <> '' then begin
|
||||
LazDocListBox.Items.Add(LazDocPathEdit.Text);
|
||||
LazDocPathEdit.Text := '';
|
||||
if PathEdit.Text <> '' then begin
|
||||
PathsListBox.Items.Add(PathEdit.Text);
|
||||
PathEdit.Text := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.LazDocDeletePathButtonClick(Sender: TObject);
|
||||
procedure TProjectFPDocOptionsFrame.DeletePathButtonClick(Sender: TObject);
|
||||
begin
|
||||
if (LazDocListBox.ItemIndex >= 0) then begin
|
||||
LazDocListBox.Items.Delete(LazDocListBox.ItemIndex);
|
||||
LazDocListBoxSelectionChange(LazDocListBox, True);
|
||||
if (PathsListBox.ItemIndex >= 0) then begin
|
||||
PathsListBox.Items.Delete(PathsListBox.ItemIndex);
|
||||
PathsListBoxSelectionChange(PathsListBox, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.LazDocListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure TProjectFPDocOptionsFrame.FPDocPackageNameEditEnter(Sender: TObject);
|
||||
begin
|
||||
LazDocDeletePathButton.Enabled:=(Sender as TListBox).ItemIndex <> -1;
|
||||
if FPDocPackageNameEdit.Text=lisDefaultPlaceholder then
|
||||
FPDocPackageNameEdit.Text:='';
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.LazDocPathEditChange(Sender: TObject);
|
||||
procedure TProjectFPDocOptionsFrame.FPDocPackageNameEditExit(Sender: TObject);
|
||||
begin
|
||||
LazDocAddPathButton.Enabled:=(Sender as TEdit).Text <> '';
|
||||
if FPDocPackageNameEdit.Text='' then
|
||||
FPDocPackageNameEdit.Text:=lisDefaultPlaceholder;
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
procedure TProjectFPDocOptionsFrame.PathsListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
begin
|
||||
with AOptions as TProject do
|
||||
SplitString(FPDocPaths, ';', LazDocListBox.Items, True);
|
||||
DeletePathButton.Enabled:=(Sender as TListBox).ItemIndex <> -1;
|
||||
end;
|
||||
|
||||
procedure TProjectLazDocOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
procedure TProjectFPDocOptionsFrame.PathEditChange(Sender: TObject);
|
||||
begin
|
||||
with AOptions as TProject do
|
||||
FPDocPaths := StringListToText(LazDocListBox.Items, ';', True);
|
||||
AddPathButton.Enabled:=(Sender as TEdit).Text <> '';
|
||||
end;
|
||||
|
||||
class function TProjectLazDocOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
procedure TProjectFPDocOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProject do begin
|
||||
SplitString(FPDocPaths, ';', PathsListBox.Items, True);
|
||||
if FPDocPackageName='' then
|
||||
FPDocPackageNameEdit.Text:=lisDefaultPlaceholder
|
||||
else
|
||||
FPDocPackageNameEdit.Text:=FPDocPackageName;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TProjectFPDocOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
begin
|
||||
with AOptions as TProject do begin
|
||||
FPDocPaths := StringListToText(PathsListBox.Items, ';', True);
|
||||
if FPDocPackageNameEdit.Text=lisDefaultPlaceholder then
|
||||
FPDocPackageName:=''
|
||||
else
|
||||
FPDocPackageName:=FPDocPackageNameEdit.Text;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TProjectFPDocOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TProject;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsEditor(GroupProject, TProjectLazDocOptionsFrame, ProjectOptionsLazDoc);
|
||||
RegisterIDEOptionsEditor(GroupProject, TProjectFPDocOptionsFrame, ProjectOptionsLazDoc);
|
||||
|
||||
end.
|
||||
|
||||
|
@ -429,7 +429,7 @@
|
||||
<Unit53>
|
||||
<Filename Value="frames/project_lazdoc_options.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="ProjectLazDocOptionsFrame"/>
|
||||
<ComponentName Value="ProjectFPDocOptionsFrame"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="project_lazdoc_options"/>
|
||||
</Unit53>
|
||||
|
@ -4457,7 +4457,11 @@ resourcestring
|
||||
lisCodeHelpErrorsTag = 'Errors';
|
||||
lisCodeHelpSeeAlsoTag = 'See also';
|
||||
lisCodeHelpAddPathButton = 'Add path';
|
||||
lisFPDocPackageName = 'FPDoc package name:';
|
||||
lisFPDocPackageNameDefaultIsProjectFileName = 'FPDoc package name. Default '
|
||||
+'is project file name.';
|
||||
lisCodeHelpDeletePathButton = 'Remove path';
|
||||
lisDefaultPlaceholder = '(default)';
|
||||
lisEONOTEOnlyAbsolutePathsAreSupportedNow = 'NOTE: only absolute paths are supported now';
|
||||
lisCodeHelpConfirmreplace = 'Confirm replace';
|
||||
lisCodeHelpReplaceButton = 'Replace';
|
||||
|
@ -2858,6 +2858,7 @@ begin
|
||||
SwitchPathDelims(CreateRelativeSearchPath(FPDocPaths,ProjectDirectory),
|
||||
fCurStorePathDelim),
|
||||
'');
|
||||
xmlconfig.SetDeleteValue(Path+'LazDoc/PackageName',FPDocPackageName,'');
|
||||
|
||||
// i18n
|
||||
xmlconfig.SetDeleteValue(Path+'i18n/EnableI18N/Value', EnableI18N, false);
|
||||
@ -3431,6 +3432,7 @@ begin
|
||||
if not LoadParts then begin
|
||||
FPDocPaths := SwitchPathDelims(xmlconfig.GetValue(Path+'LazDoc/Paths', ''),
|
||||
fPathDelimChanged);
|
||||
FPDocPackageName:=xmlconfig.GetValue(Path+'LazDoc/PackageName','');
|
||||
end;
|
||||
|
||||
// i18n
|
||||
|
@ -378,6 +378,7 @@ type
|
||||
FCustomData: TStringToStringTree;
|
||||
FCustomSessionData: TStringToStringTree;
|
||||
FExecutableType: TProjectExecutableType;
|
||||
FFPDocPackageName: string;
|
||||
fModified: boolean;
|
||||
FProjectSessionFile: string;
|
||||
FSessionModified: boolean;
|
||||
@ -387,6 +388,7 @@ type
|
||||
FUseAppBundle: Boolean;
|
||||
procedure SetCleanOutputFileMask(const AValue: string);
|
||||
procedure SetCleanSourcesFileMask(const AValue: string);
|
||||
procedure SetFPDocPackageName(AValue: string);
|
||||
procedure SetFPDocPaths(const AValue: string);
|
||||
protected
|
||||
FLazCompilerOptions: TLazCompilerOptions;
|
||||
@ -431,6 +433,7 @@ type
|
||||
procedure ConvertToLPIFilename(var AFilename: string); virtual; abstract;
|
||||
procedure ConvertFromLPIFilename(var AFilename: string); virtual; abstract;
|
||||
procedure LoadDefaultIcon; virtual;
|
||||
function GetFPDocPackageName: string;
|
||||
public
|
||||
property MainFileID: Integer read GetMainFileID write SetMainFileID;
|
||||
property Files[Index: integer]: TLazProjectFile read GetFiles;
|
||||
@ -455,6 +458,7 @@ type
|
||||
// project session data (not units, data),
|
||||
// units have their own SessionModified
|
||||
property FPDocPaths: string read FFPDocPaths write SetFPDocPaths;
|
||||
property FPDocPackageName: string read FFPDocPackageName write SetFPDocPackageName;
|
||||
property LazDocPaths: string read FFPDocPaths write SetFPDocPaths; deprecated;
|
||||
property CleanOutputFileMask: string read FCleanOutputFileMask write SetCleanOutputFileMask; // saved in session
|
||||
property CleanSourcesFileMask: string read FCleanSourcesFileMask write SetCleanSourcesFileMask; // saved in session
|
||||
@ -1068,6 +1072,13 @@ begin
|
||||
SessionModified:=true;
|
||||
end;
|
||||
|
||||
procedure TLazProject.SetFPDocPackageName(AValue: string);
|
||||
begin
|
||||
if FFPDocPackageName=AValue then Exit;
|
||||
FFPDocPackageName:=AValue;
|
||||
Modified:=true;
|
||||
end;
|
||||
|
||||
function TLazProject.GetModified: boolean;
|
||||
begin
|
||||
Result:=fModified;
|
||||
@ -1114,6 +1125,7 @@ begin
|
||||
FTitle:='';
|
||||
FSessionStorage:=DefaultNewProjectSessionStorage;
|
||||
FFPDocPaths:='';
|
||||
FFPDocPackageName:='';
|
||||
end;
|
||||
|
||||
function TLazProject.ShortDescription: string;
|
||||
@ -1140,6 +1152,14 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
function TLazProject.GetFPDocPackageName: string;
|
||||
begin
|
||||
if FPDocPackageName<>'' then
|
||||
Result:=FPDocPackageName
|
||||
else
|
||||
Result:=ExtractFileNameOnly(ProjectInfoFile);
|
||||
end;
|
||||
|
||||
{ TLazProjectFile }
|
||||
|
||||
procedure TLazProjectFile.SetIsPartOfProject(const AValue: boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user