Main Page | Class List | File List | Class Members | Related Pages

org.doxygen.tools.DoxygenTask Class Reference

List of all members.

Detailed Description

Ant task for Doxygen. This task provides a mapping between all current Doxygen configuration file options (as of 1.2.18) and Ant build files. <br/>

Doxygen and JavaDoc co-existence. <br/>
Note:
This file uses a combination of JavaDoc and Doxygen formatting codes. Doxygen tags begin with a single back-slash instead of the JavaDoc standard at-sign. This reduces the number of warnings which JavaDoc issues when parsing a Doxygen documented file while also including that text in JavaDoc output (albeit poorly formatted). <br/><br/>
By placing all Doxygen paragraphs before any JavaDoc paragraphs, all text will naturally flow into the body of the main paragraph (for a graceful degradation). <br/><br/>

Also, but placing one or two HTML <br> tags at the end of each paragraph, the degradation from Doxygen to JavaDoc will be less severe. <br/><br/>

Author:
Karthik Kumar
Version:
Revision
1.8.4.8
Since:
Ant 1.5

Definition at line 110 of file DoxygenTask.java.

Public Member Functions

 DoxygenTask ()
final void execute () throws BuildException
final void setVersionCompatible (String newVersion)
final String getVersionCompatible ()
final void setVerbose (final boolean attr)
final void setConfigFilename (final String attr)
final void setDoxygenPath (final String attr)
final Property createProperty ()
final void setConfig (String name, String value)
Map getTaskAttributes ()
final void activityLog (final boolean terseMessage, final String theMessage)

Static Public Attributes

final String CONFIG_FILE


Constructor & Destructor Documentation

org.doxygen.tools.DoxygenTask.DoxygenTask  ) 
 

Initializes the Doxygen Configuration options.

Definition at line 155 of file DoxygenTask.java.

00155                          {
00156         proc = new DoxygenProcess();
00157         conf = new DoxygenConfig();
00158     }


Member Function Documentation

final void org.doxygen.tools.DoxygenTask.activityLog final boolean  terseMessage,
final String  theMessage
 

This method allows a single point of control over the task output verbosity. <br/>

Test:
message output is conditional. Some messages are always output, while others are only sometimes output. <br/>
Parameters:
terseMessage is a flag that indicates the calling code wants this message to appear regardless of the current verbosity level.
theMessage to be output, guard condition permitting.

Definition at line 312 of file DoxygenTask.java.

00313                                                            {
00314         if  (theMessage != null) {
00315             if  (terseMessage || verbose) {
00316                 System.out.println(theMessage);
00317             }
00318         }
00319     }

final Property org.doxygen.tools.DoxygenTask.createProperty  ) 
 

This method enables nested property tags. This is the preferred attribute specification method as it reduces the acute knowledge that the task has over a given Doxygen implementation. However, non-nested attributes may still be specified. <br/>

Note:
this method is only called by Ant. <br/>
Returns:
an empty Property.

Definition at line 272 of file DoxygenTask.java.

References org.doxygen.tools.DoxygenConfig.addNestedAttribute().

00272                                            {
00273         Property p = new Property();
00274         conf.addNestedAttribute(p);
00275         return p;
00276     }

final void org.doxygen.tools.DoxygenTask.execute  )  throws BuildException
 

This is the main execution entry-point of the task.

Exceptions:
BuildException thrown in case any problem executing the task.

Definition at line 168 of file DoxygenTask.java.

References org.doxygen.tools.DoxygenProcess.checkVersion(), org.doxygen.tools.DoxygenTask.CONFIG_FILE, org.doxygen.tools.DoxygenProcess.createConfig(), org.doxygen.tools.DoxygenProcess.executeDoxygenConfig(), and org.doxygen.tools.DoxygenConfig.writeDoxygenConfig().

00168                                                       {
00169         proc.checkVersion(versionCompatible);
00170         System.out.println("Version check complete");
00171         if (configFilename == null ) {
00172             configFilename = CONFIG_FILE;
00173             proc.createConfig(configFilename);
00174         }
00175         conf.writeDoxygenConfig(configFilename);  // Then we update it.
00176         System.out.println("Created Config file");
00177         proc.executeDoxygenConfig(configFilename);
00178         
00179         // No need to delete the config. file at all. 
00180         //Let it be there for the user to know what was used.
00181     }

Map org.doxygen.tools.DoxygenTask.getTaskAttributes  ) 
 

Returns:
Returns the Task Attributes of the Doxygen config. property file.

Definition at line 295 of file DoxygenTask.java.

References org.doxygen.tools.DoxygenConfig.getTaskAttributes().

00295                                    {
00296         return conf.getTaskAttributes();
00297     }

final String org.doxygen.tools.DoxygenTask.getVersionCompatible  ) 
 

Returns:
Returns the version against which the compatibility check is to be run.

Definition at line 197 of file DoxygenTask.java.

00197                                                {
00198         return versionCompatible;
00199     }

final void org.doxygen.tools.DoxygenTask.setConfig String  name,
String  value
 

Parameters:
name Name of the configuration property. Value of the configuration property.

Definition at line 283 of file DoxygenTask.java.

References org.doxygen.tools.DoxygenConfig.addNestedAttribute().

00283                                                            {
00284         Property p = new Property();
00285         p.setName(name);
00286         p.setValue(value);
00287         conf.addNestedAttribute(p);
00288     }

final void org.doxygen.tools.DoxygenTask.setConfigFilename final String  attr  ) 
 

Core Ant task element which specifies an non-generated Doxygen base configuration file. All <doxygen> elements and nested elements that appear in the build.xml file will take precedence over this base configuration. <br/><br/>

The base configuration file will not be updated. Doxygen will be invoked with an amalgamated configuration file which is derived from either this configuration file or if not specified, a Doxygen default and then Ant task flavored almalgamated configuration file. <br/><br/>

Test:
If the configuration file is set, then the amalgamated configuration file is retained. <br/>
Parameters:
attr from build.xml.

Definition at line 238 of file DoxygenTask.java.

00238                                                            {
00239         configFilename = attr;
00240     }

final void org.doxygen.tools.DoxygenTask.setDoxygenPath final String  attr  ) 
 

Core Ant task element which specifies a path to the Doxygen executable. By default the application name "doxygen" is used which presumes Doxygen is on the path. <br/>

Test:
Specification of a bogus application name will fail. <br/>

Todo:
Add a test to see that the specified executable exists. <br/>
Parameters:
attr from build.xml.

Definition at line 255 of file DoxygenTask.java.

References org.doxygen.tools.DoxygenProcess.setDoxygenPath().

00255                                                         { 
00256         proc.setDoxygenPath(attr); 
00257     }

final void org.doxygen.tools.DoxygenTask.setVerbose final boolean  attr  ) 
 

Core Ant task element that controls the output verbosity of this Ant task. By default, verbosity is minimized to allow for cleaner build logs. Turn this on, if you need more detailed diagnostic information. <br/>

Test:
there is a marked difference in output depending on the value of verbose.
Parameters:
attr from build.xml.

Definition at line 217 of file DoxygenTask.java.

00217 { verbose = attr; }

final void org.doxygen.tools.DoxygenTask.setVersionCompatible String  newVersion  ) 
 

Parameters:
newVersion Sets the version against which compatibility check is to be run.

Definition at line 188 of file DoxygenTask.java.

00188                                                               {
00189         versionCompatible = newVersion;
00190     }


Member Data Documentation

final String org.doxygen.tools.DoxygenTask.CONFIG_FILE [static]
 

Initial value:

        System.getProperty("user.home") + File.separator + ".doxytmp"
Name of the temporary configuration file that will be created in ${user.home}.

Definition at line 116 of file DoxygenTask.java.

Referenced by org.doxygen.tools.DoxygenTask.execute().


The documentation for this class was generated from the following file:
Generated on Sat Jan 31 02:17:29 2004 for Ant-Doxygen by doxygen 1.3.4