Sign in Join
Wiki copytemporary

FPDoc Editor: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: FPDoc Editor

OldNewLine
1+## Introduction
2+
3+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: [Free Pascal documentation tool manual](http://www.freepascal.org/docs-html/fpdoc/fpdoc.html).
4+
5+<figure>
6+<img src="FPDocEditorDescription.png" title="FPDocEditorDescription.png" />
7+<figcaption>FPDocEditorDescription.png</figcaption>
8+</figure>
9+
10+Lazarus provides inline FPDoc help viewer in hints and two help file editors either of which you can use to create or update source code documentation in FPDoc format. If you want to see it correctly formatted, you have to install Package TurboPowerIProDsgn.lpk! 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 [[Lazarus Documentation Editor|LazDE]].
11+
12+**LazDE** is a bigger brother to **FPDoc Editor** and is the Lazarus Documentation Editor. 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. You can add it into menu Tools as external tool.
13+
14+## Using the FPDoc Editor
15+
16+To use the FPDoc Editor you simply:
17+
18+1. Open the FPDoc Editor. You will find it under the View menu.
19+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 together 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.
20+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.
21+4. Write a short description.
22+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).
23+
24+## Editing FPDoc entries for the LCL sources and Lazarus sources
25+
26+There are in folder (\$LazDir)\docs\xml, You can add this folder to FPDoc paths at Tools / Options / Environment / FPDoc Editor
27+
28+## Editing FPDoc entries for the FPC sources, RTL and FCL
29+
30+The FPDoc entries for the FPC sources can be downloaded from svn:
31+
32+``` bash
33+cd /home/username/yourchoice/
34+svn co http://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs
35+```
36+
37+Add the path */home/username/yourchoice/fpcdocs* to Tools / Options / Environment / FPDoc Editor
38+
39+A good item to test FPDoc on is *TComponent.Name*.
40+
41+## Future plans
42+
43+The todo list currently contains the following items, in no particular order:
44+
45+- Write a help editor for topics.
46+- Create nicer HTML output for the hint windows.
47+- Support Operators
48+- Jump to next/previous undocumented identifier
49+
50+### Already done
51+
52+- Extend the link editor to show packages and identifiers
53+- Add documentation tags "example" to FPDoc Editor
54+- Add documentation tags "topic" to FPDoc Editor
55+- Make FPDoc Editor create new elements in documentation
56+- Make FPDoc Editor create new documentation files
57+- Adding a small toolbar makes it possible to use the available markup tags
58+- Make FPDoc Editor work on keydown in source code editor
59+- Add FPDoc Editor to IDE settings (showing and position in IDE)
60+- Make it work for fpc sources (rtl files already exist)
61+- Add settings to environment menu
62+- Make it work on project files also
63+- Propose to expand documentation tags with: "todo" and "notes" (no need for that, as there are alternatives)
64+- Reduce overhead even further
65+- All source elements are interpreted by FPDoc Editor using codetools
66+- Find inherited entries. For example TControl.Align of TButton.Align
67+- Optimization: inherited Entries are parsed on idle
68+- Optimization: xml files are cached, and only parsed once or if they changed on disk
69+- Add a HTML viewer. This is available by installing the turbopoweriprodsgn package
70+- Checks for invalid xml tags and auto repairs them
71+
72+---
73+*From the Free Pascal wiki, page "FPDoc Editor", as it stood on 2023-01-30 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history