Code documentation for delphi similar to javadoc or c# xml doc

11,534

Solution 1

Take a look at SynProject, an Open Source tool written in Delphi.

It was designed to handle a full documentation workflow, from specifications to release notes, including tests, architecture and design; and of course there is an integrated Delphi parser to generate architecture documentation from existing Delphi source code.

For the architecture document, the source code can extract comments (ala PasDoc) then embed this text into the main Architecture document (with class hierarchy diagrams and unit dependencies).

You write a plain text file using a wiki-like syntax in a dedicated text editor, then SynProject creates well formated Word documents from it. Some Wizards are available to access the content. But since it's stored as plain file, multiple programmers can write on it, using any SCM tool (SVN, Fossil...).

For instance, I currently use it for writing maintenance documentation for a huge and old Delphi application (about 2,000,000 lines of code written in Delphi 5 and 6), with no prior available documentation. You describe the changes made to the code (by quoting the unit/class/method), then the tool will update all documentations to reflect and trace those modifications. SynProject was designed to be compliant with some very "delicate" regulation rules (IEC 62304), but can be used for any project due to its unique "flat" design.

Note: I'm posting this a long time after the question, because SynProject was not existing at this time, and can be worth looking at. This thread has been defined as a reference for that question.

Solution 2

As far as I'm aware, there is no tool easily compatible with Microsoft Sandcastle - at least until somebody actually bothers to write one, to modify an existing one, or to create a toolchain to properly transform the output.

I've personally used PasDoc with great success. I recommend building the latest SVN version, since the current release occasionally croaks on complicated interface definitions.

Solution 3

Delphi + JavaDoc = DelphiCodeToDoc

Solution 4

Try: - Doxygen documentation - Pas2Dox

Solution 5

Since Delphi 2005 it is build in the Delphi compiler. It uses the XMLDoc standard which uses XML style comments. Just as C# does, so I guess Sandcastle can handle it. See http://dn.codegear.com/article/32770 and http://tondrej.blogspot.com/2006/03/xml-documentation-in-delphi-2006.html

Also see Documenting Delphi

Share:
11,534
ChaosSpeeder
Author by

ChaosSpeeder

Updated on June 05, 2022

Comments

  • ChaosSpeeder
    ChaosSpeeder about 2 years

    I need a code documentation tool similar to javadoc or c# xml doc for delphi code. What is the best tool? I prefer a technology, which is in the future compatible to the Microsoft sandcastle project.

  • Richard A
    Richard A over 15 years
    I also use PasDoc and run it from an Ant build script called by CruiseControl, FWIW.
  • Fabricio Araujo
    Fabricio Araujo over 15 years
    The D2006 XMLDoc generator is completely broken. I tried to use it - does not work at after all patches.
  • mjn
    mjn about 15 years
    I use it successfully in the past five or so years, still a great and simple solution.
  • Pauk
    Pauk about 15 years
    Richard, that's a good point since it shows it can be automated via a build.
  • sdu
    sdu over 14 years
    works great (and looks like the documentation for c and c++ project we also use)
  • Phil Gilmore
    Phil Gilmore about 13 years
    It was unclear to me at first, so I wanted to add a comment to others that these two products work together. Pas2Dox seems to be an add-on for Doxygen, adding Delphi support to it.
  • awmross
    awmross about 11 years
    I tried this and it crashed on and file that contained an anonymous procedure.
  • Soon Santos
    Soon Santos over 5 years
    Any tutorial on how to generate the documentation for delphi?
  • Arnaud Bouchez
    Arnaud Bouchez over 5 years
    You have synopse.info/fossil/wiki?name=SynProject+Tutorial and other links available.