mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 19:52:26 +02:00
IDE: fpdoc editor: example browse button
git-svn-id: trunk@35012 -
This commit is contained in:
parent
558c1e6374
commit
891c0030b3
@ -47,7 +47,7 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
IDEWindowIntf, ProjectIntf, LazIDEIntf, IDEHelpIntf, LazHelpIntf, Menus,
|
IDEWindowIntf, ProjectIntf, LazIDEIntf, IDEHelpIntf, LazHelpIntf, Menus,
|
||||||
SrcEditorIntf,
|
SrcEditorIntf, IDEDialogs,
|
||||||
// IDE
|
// IDE
|
||||||
IDEOptionDefs, EnvironmentOpts, PackageSystem, IDEProcs, LazarusIDEStrConsts,
|
IDEOptionDefs, EnvironmentOpts, PackageSystem, IDEProcs, LazarusIDEStrConsts,
|
||||||
FPDocSelectInherited, FPDocSelectLink, CodeHelp;
|
FPDocSelectInherited, FPDocSelectLink, CodeHelp;
|
||||||
@ -1521,9 +1521,17 @@ end;
|
|||||||
procedure TFPDocEditor.BrowseExampleButtonClick(Sender: TObject);
|
procedure TFPDocEditor.BrowseExampleButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Doc=nil then exit;
|
if Doc=nil then exit;
|
||||||
if OpenDialog.Execute then
|
InitIDEFileDialog(OpenDialog);
|
||||||
|
OpenDialog.Title:=lisChooseAnExampleFile;
|
||||||
|
OpenDialog.Filter:=lisPascalFile+'|*.pas;*.pp;*.p|'+dlgAllFiles+'|'+FileMask;
|
||||||
|
OpenDialog.InitialDir:=ExtractFilePath(DocFile.Filename);
|
||||||
|
if OpenDialog.Execute then begin
|
||||||
ExampleEdit.Text := SetDirSeparators(ExtractRelativepath(
|
ExampleEdit.Text := SetDirSeparators(ExtractRelativepath(
|
||||||
ExtractFilePath(DocFile.Filename), OpenDialog.FileName));
|
ExtractFilePath(DocFile.Filename), OpenDialog.FileName));
|
||||||
|
if ExampleEdit.Text<>FOldVisualValues[fpdiExample] then
|
||||||
|
Modified:=true;
|
||||||
|
end;
|
||||||
|
StoreIDEFileDialog(OpenDialog);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPDocEditor.CopyFromInheritedButtonClick(Sender: TObject);
|
procedure TFPDocEditor.CopyFromInheritedButtonClick(Sender: TObject);
|
||||||
|
@ -3018,6 +3018,8 @@ resourcestring
|
|||||||
lisFPDocFPDocSyntaxError = 'FPDoc syntax error';
|
lisFPDocFPDocSyntaxError = 'FPDoc syntax error';
|
||||||
lisFPDocThereIsASyntaxErrorInTheFpdocElement = 'There is a syntax error in '
|
lisFPDocThereIsASyntaxErrorInTheFpdocElement = 'There is a syntax error in '
|
||||||
+'the fpdoc element "%s":%s%s';
|
+'the fpdoc element "%s":%s%s';
|
||||||
|
lisChooseAnExampleFile = 'Choose an example file';
|
||||||
|
lisPascalFile = 'Pascal file';
|
||||||
lisUnableToWriteToFile2 = 'Unable to write to file "%s".';
|
lisUnableToWriteToFile2 = 'Unable to write to file "%s".';
|
||||||
lisUnableToWriteTheProjectSessionFileError = 'Unable to write the project '
|
lisUnableToWriteTheProjectSessionFileError = 'Unable to write the project '
|
||||||
+'session file%s"%s".%sError: %s';
|
+'session file%s"%s".%sError: %s';
|
||||||
|
Loading…
Reference in New Issue
Block a user