Methods Summary |
---|
public com.vladium.emma.report.ReportCfg.Element_HTML | createHtml()
return m_reportCfg.createHtml ();
|
public org.apache.tools.ant.types.Path | createSourcepath()
return m_reportCfg.createSourcepath ();
|
public com.vladium.emma.report.ReportCfg.Element_TXT | createTxt()
return m_reportCfg.createTxt ();
|
public com.vladium.emma.report.ReportCfg.Element_XML | createXml()
return m_reportCfg.createXml ();
|
public void | execute()
if (isEnabled ())
{
final String [] reportTypes = m_reportCfg.getReportTypes ();
if ((reportTypes == null) || (reportTypes.length == 0)) // no "txt" default for report processor
throw (BuildException) newBuildException (getTaskName ()
+ ": no report types specified: provide at least one of <txt>, <html>, <xml> nested elements", location).fillInStackTrace ();
String [] files = getDataPath (true);
if ((files == null) || (files.length == 0))
throw (BuildException) newBuildException (getTaskName ()
+ ": no valid input data files have been specified", location).fillInStackTrace ();
final Path srcpath = m_reportCfg.getSourcepath ();
// combine report and all generic settings:
final IProperties settings;
{
final IProperties taskSettings = getTaskSettings ();
final IProperties reportSettings = m_reportCfg.getReportSettings ();
// named report settings override generic named settings and file
// settings have lower priority than any explicitly named overrides:
settings = IProperties.Factory.combine (reportSettings, taskSettings);
}
final ReportProcessor processor = ReportProcessor.create ();
processor.setDataPath (files); files = null;
processor.setSourcePath (srcpath != null ? srcpath.list () : null);
processor.setReportTypes (reportTypes);
processor.setPropertyOverrides (settings);
processor.run ();
}
|
public void | init()
super.init ();
m_reportCfg = new ReportCfg (getProject (), this);
|
public void | setColumns(java.lang.String columns)
m_reportCfg.setColumns (columns);
|
public void | setDepth(DepthAttribute depth)
m_reportCfg.setDepth (depth);
|
public void | setEncoding(java.lang.String encoding)
m_reportCfg.setEncoding (encoding);
|
public void | setMetrics(java.lang.String metrics)
m_reportCfg.setMetrics (metrics);
|
public void | setSort(java.lang.String sort)
m_reportCfg.setSort (sort);
|
public void | setSourcepath(org.apache.tools.ant.types.Path path)
m_reportCfg.setSourcepath (path);
|
public void | setSourcepathRef(org.apache.tools.ant.types.Reference ref)
m_reportCfg.setSourcepathRef (ref);
|
public void | setUnits(UnitsTypeAttribute units)
m_reportCfg.setUnits (units);
|