XDoclet's popularity has resulted in a number of related tools, all of which are either in alpha state, or not started. This document gives a brief description of these tools. Comments and thoughts about these tools are most welcome, and should be sent to xdoclet-devel@lists.sourceforge.net (Middlegen has its own mailing list: middlegen-devel@lists.sourceforge.net).

XJavadoc (separate xjavadoc module in xdoclet CVS tree)

XJavadoc is a clone of Sun's javadoc core. It has code mutation capabilities for inserting and modifying tags in existing source code in the following way:

XClass[] classes = _xj.classes();
SourceClass clazz = (SourceClass)classes[0];
// get the doIt( java.lang.String[] s, int i ) method
XMethod method = clazz.getMethod("doIt", new String[]{"java.lang.String[]", "int"});
// get the javadoc
SourceDoc doc = (SourceDoc)method.doc();
// modify a tag parameter
XTag tag = doc.tag("numbers");
XTagParameter tagParameter = tag.getParameter("three", true);
tagParameter.setValue("trois");
File modifiedDir = new File("modified");
String fileName = ((SourceClass)classes[0]).save(modifiedDir );

XJavadoc is used by XDoclet GUI to insert/modify tags in existing source code.

XJavadoc will be used by the upcoming Reverse XDoclet.

XJavadoc will be used by XDoclet (once XJavadoc is mature enough), and hopefully provide faster parsing and avoid some shortcomings such as warnings.

XJavadoc will also remove the burden of parsing tag parameters from XDoclet.

Middlegen (See http://boss.bekk.no/boss/middlegen/)

Middlegen will be refactored into smaller pieces and work as a plugin for XDoclet GUI, which will be a more generalised GUI for XDoclet. The planned sub components of middlegen are:

core

The core is a non gui component that reads JDBC metadata and generates an XML file describing the tables and the relationships in an existing database. The XML file will be inspired from EJB deployment descriptors, and serve as input for the GUI component

code generator

The code generator will create XDoclet tag annotated java source files. It will use XDoclet's template engine in stead of out.print() as it does today. The generated code will be based on the xml read by the core, and the settings set in the gui.

gui

The gui component will provide the main panel showing relationships, and configuration panels that will influence how the generated code will be. It will be written in a way that lets it integrate with the more general XDoclet gui.

XDoclet GUI (alpha)

XDoclet GUI is a tag editor for existing source code. It provides tool tips for each tag/tag parameter taken from the xtags xml. It will only let you insert tags that are appropriate for the selected class/method. XDoclet GUI can also be integrated into IDEs such as Forte/NetBeans, JBuilder and IntelliJ IDEA. Here is a screenshot of the current state of the tool:

Source code is available in the XDoclet CVS, as a separate xdocletgui module.

XTags (alpha)

XTags is a tool that can validate tags in source code. It can be used by XDoclet to validate tags, or by XDoclet GUI to decide what tags should be available in the panel for a selected class/method.

Source code is currently available from http://www.pribluda.de/xtags.tar.gz and is developed by Konstantin Pribluda (kpriblouda@yahoo.com).

There is an alternative implementation of xtags in the xdocletgui module. XDoclet GUI's xtags and Konstantin's xtags will probably be merged together and be moved under the xdoclet module in the future.

Reverse XDoclet

The (not started) Reverse XDoclet tool will automatically insert tags into existing source code that doesn't have XDoclet tags. This will be done by parsing existing deployment descriptors and take advantage of xjavadoc's doc mutation features. The main purpose of Reverse XDoclet is to make it easier to start using XDoclet in existing projects.