Difference between revisions of "FPDoc Editor/ru"

From Free Pascal wiki
Jump to navigationJump to search
(initial english text)
 
(base translation)
Line 1: Line 1:
 
{{FPDoc Editor}}
 
{{FPDoc Editor}}
  
== Introduction ==
+
== Вступление ==
FPDoc is the Free Pascal documentation tool which is specifically designed to create help files for individual units of Pascal source code. For more information about FPDoc see here: [http://www.freepascal.org/docs-html/fpdoc/fpdoc.html Free Pascal documentation tool manual].
+
FPDoc это средство для формирования документации к модулям Free Pascal. Подробное описание FPDoc есть на английском языке: [http://www.freepascal.org/docs-html/fpdoc/fpdoc.html Free Pascal documentation tool manual].
  
 
[[image:FPDocEditorDescription.png]]
 
[[image:FPDocEditorDescription.png]]
  
Lazarus provides two help file editors either of which you can use to create or update source code documentation in FPDoc format. The simpler editor, integrated into the Lazarus IDE is called '''FPDoc Editor''', and is described on this page. There is also a more complete and complex editor called LazDE.
+
Lazarus включает два редактора FPDoc, которые могут использоваться для создания и поддержки документации к исходникам. Более простой редактор интегрирован в Lazarus IDE так и называется, '''FPDoc Editor''' (Редактор FPDoc), и именно он описан на этой странице.  
  
'''LazDE''' is a bigger brother to '''FPDoc Editor''' and is the Lazarus Documentation Editor. See here: [[Lazarus_Documentation_Editor|LazDE - Lazarus Documentation Editor]]
+
Существует также более мощный редактор, который называется [[Lazarus_Documentation_Editor|LazDE]]. '''LazDE''' - старший брат '''FPDoc Editor''', и полностью называется Lazarus Documentation Editor. Это самостоятельное приложение, оно не интегрировано в Lazarus IDE. Поставляется в исходниках, проект расположен в папке ($LazDir)/doceditor/lazde.lpi. Скомпилируйте проект lazde однажды (используя Lazarus), и затем запускайте LazDE независимо.
It is a standalone application (not an integral part of the IDE). It is located at ($LazDir)/doceditor/lazde.lpi. Once you have compiled the lazde project (using Lazarus) LazDE then runs outside the IDE.
 
  
== Using the FPDoc Editor ==
+
== Использование редактора FPDoc ==
To use the FPDoc Editor you simply:
+
Чтоб воспользоваться FPDoc Editor достаточно:
  
1. Open the FPDoc Editor. You will find it under the View menu.
+
1. Открыть пункт FPDoc Editor (Редактор FPDoc) в меню View (Вид).
  
2. In the Lazarus source code editor move the cursor to some code element. You will notice that the FPDoc Editor's Caption changes to show the selected source element togeher with the filename of the documentation file. Within FPDoc Editor you can select an appropriate page where you can edit a specific documentation tag. Of course it is also possible to use FPDoc Editor only to view documentation files, without changing them.
+
2. В редакторе исходного кода Lazarus поставить курсор на нужный элемент кода. Вы заметите, что заголовок окна редактора FPDoc изменился, и показывает имя этого элемента вместе с именем файла документации. В редакторе FPDoc Вы можете перейти на подходящую вкладку чтобы  редактировать соответствующий тег документации. И естественно, Вы можете использовать редактор FPDoc и для просмотра имеющейся документации, не  начиная менять её.
  
3. Click on the Create Help button. If you have not yet set up search paths for FPDoc the IDE will ask you where the FPDoc files it generates should be stored. For each of your projects you would normally provide a 'docs' subdirectory.
+
3. Нажать кнопку Create Help (Создать элемент справки). Если Вы ещё не настроили пути для файлов FPDoc, IDE спросит, где хранить генерируемые файлы. Обычно у каждого проекта создают свою папку 'docs'.
  
4. Write a short description.
+
4. Вписать краткое описание
  
5. Click on the Save button to the left or go to the next item (the editor automatically saves a description when you move away from it).
+
5. Нажать кнопку Save слева или просто перейти к следующему элементу исходников (редактор автоматически сохраняет внесённые изменения по элементу, когда курсор с него уходит).
  
==Editing FPDoc entries for the FPC sources, RTL and FCL==
+
== Редактирование FPDoc для поставляемых исходников FPC, RTL and FCL==
  
The FPDoc entries for the FPC sources can be downloaded from svn:
+
Записи FPDoc для исходников FPC могут быть взяты из svn:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
cd /home/username/yourchoice/
 
cd /home/username/yourchoice/
Line 32: Line 31:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Add the path ''/home/username/yourchoice/fpcdocs'' to Tools / Options / Environment / FPDoc Editor
+
Добавьте путь ''/home/username/yourchoice/fpcdocs'' в Tools / Options / Environment / FPDoc Editor (Сервис / Параметры / Окружение / Редактор FPDoc)
  
A good item to test FPDoc on is ''TComponent.Name''.
+
Для проверки результата можно посмотреть, например, на FPDoc для ''TComponent.Name''.
  
== Future plans ==
+
== Планы на будущее ==
The todo list currently contains the following items, in no particular order:
+
Список todo сейчас содержит следующие пункты (расположены не в порядке приоритетности):
  
 
*Write a help editor for topics.
 
*Write a help editor for topics.
Line 43: Line 42:
 
*Support Operators
 
*Support Operators
  
=== Already done ===
+
=== Уже сделано ===
 
* Extend the link editor to show packages and identifiers
 
* Extend the link editor to show packages and identifiers
 
* Add documentation tags "example" to FPDoc Editor
 
* Add documentation tags "example" to FPDoc Editor

Revision as of 10:12, 22 January 2014

Deutsch (de) English (en) français (fr) 日本語 (ja) polski (pl) português (pt) русский (ru)

Вступление

FPDoc это средство для формирования документации к модулям Free Pascal. Подробное описание FPDoc есть на английском языке: Free Pascal documentation tool manual.

FPDocEditorDescription.png

Lazarus включает два редактора FPDoc, которые могут использоваться для создания и поддержки документации к исходникам. Более простой редактор интегрирован в Lazarus IDE так и называется, FPDoc Editor (Редактор FPDoc), и именно он описан на этой странице.

Существует также более мощный редактор, который называется LazDE. LazDE - старший брат FPDoc Editor, и полностью называется Lazarus Documentation Editor. Это самостоятельное приложение, оно не интегрировано в Lazarus IDE. Поставляется в исходниках, проект расположен в папке ($LazDir)/doceditor/lazde.lpi. Скомпилируйте проект lazde однажды (используя Lazarus), и затем запускайте LazDE независимо.

Использование редактора FPDoc

Чтоб воспользоваться FPDoc Editor достаточно:

1. Открыть пункт FPDoc Editor (Редактор FPDoc) в меню View (Вид).

2. В редакторе исходного кода Lazarus поставить курсор на нужный элемент кода. Вы заметите, что заголовок окна редактора FPDoc изменился, и показывает имя этого элемента вместе с именем файла документации. В редакторе FPDoc Вы можете перейти на подходящую вкладку чтобы редактировать соответствующий тег документации. И естественно, Вы можете использовать редактор FPDoc и для просмотра имеющейся документации, не начиная менять её.

3. Нажать кнопку Create Help (Создать элемент справки). Если Вы ещё не настроили пути для файлов FPDoc, IDE спросит, где хранить генерируемые файлы. Обычно у каждого проекта создают свою папку 'docs'.

4. Вписать краткое описание

5. Нажать кнопку Save слева или просто перейти к следующему элементу исходников (редактор автоматически сохраняет внесённые изменения по элементу, когда курсор с него уходит).

Редактирование FPDoc для поставляемых исходников FPC, RTL and FCL

Записи FPDoc для исходников FPC могут быть взяты из svn:

cd /home/username/yourchoice/
svn co http://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs

Добавьте путь /home/username/yourchoice/fpcdocs в Tools / Options / Environment / FPDoc Editor (Сервис / Параметры / Окружение / Редактор FPDoc)

Для проверки результата можно посмотреть, например, на FPDoc для TComponent.Name.

Планы на будущее

Список todo сейчас содержит следующие пункты (расположены не в порядке приоритетности):

  • Write a help editor for topics.
  • Create nicer HTML output for the hint windows.
  • Support Operators

Уже сделано

  • Extend the link editor to show packages and identifiers
  • Add documentation tags "example" to FPDoc Editor
  • Add documentation tags "topic" to FPDoc Editor
  • Make FPDoc Editor create new elements in documentation
  • Make FPDoc Editor create new documentation files
  • Adding a small toolbar makes it possible to use the available markup tags
  • Make FPDoc Editor work on keydown in source code editor
  • Add FPDoc Editor to IDE settings (showing and position in IDE)
  • Make it work for fpc sources (rtl files already exist)
  • Add settings to environment menu
  • Make it work on project files also
  • Propose to expand documentation tags with: "todo" and "notes" (no need for that, as there are alternatives)
  • Reduce overhead even further
  • All source elements are interpreted by FPDoc Editor using codetools
  • Find inherited entries. For example TControl.Align of TButton.Align
  • Optimization: inherited Entries are parsed on idle
  • Optimization: xml files are cached, and only parsed once or if they changed on disk
  • Add a HTML viewer. This is available by installing the turbopoweriprodsgn package
  • Checks for invalid xml tags and auto repairs them