Package org.apache.tools.ant.taskdefs.Javadoc

Examples of org.apache.tools.ant.taskdefs.Javadoc.DocletInfo


  // Tell Javadoc which packages we want to scan.
  // JDiff works with packagenames, not sourcefiles.
  jd.setPackagenames(getPackageList(proj));
 
  // Create the DocletInfo first so we have a way to use it to add params
  DocletInfo dInfo = jd.createDoclet();
  jd.setDoclet("jdiff.JDiff");
  jd.setDocletPath(new Path(project, jdiffClassPath));
 
  // Now set up some parameters for the JDiff doclet.
  DocletParam dp1 = dInfo.createParam();
  dp1.setName("-apiname");
  dp1.setValue(apiname);
  DocletParam dp2 = dInfo.createParam();
  dp2.setName("-baseURI");
  dp2.setValue("http://www.w3.org");
  // Put the generated file in the same directory as the report
  DocletParam dp3 = dInfo.createParam();
  dp3.setName("-apidir");
  dp3.setValue(getDestdir().toString());
 
  // Execute the Javadoc command to generate the XML file.
  jd.perform();
View Full Code Here


  // Tell Javadoc which files we want to scan - a dummy file in this case
  jd.setSourcefiles(jdiffHome + DIR_SEP + "Null.java");
 
  // Create the DocletInfo first so we have a way to use it to add params
  DocletInfo dInfo = jd.createDoclet();
  jd.setDoclet("jdiff.JDiff");
  jd.setDocletPath(new Path(project, jdiffClassPath));
 
  // Now set up some parameters for the JDiff doclet.
  DocletParam dp1 = dInfo.createParam();
  dp1.setName("-oldapi");
  dp1.setValue(oldapiname);
  DocletParam dp2 = dInfo.createParam();
  dp2.setName("-newapi");
  dp2.setValue(newapiname);
  // Get the generated XML files from the same directory as the report
  DocletParam dp3 = dInfo.createParam();
  dp3.setName("-oldapidir");
  dp3.setValue(getDestdir().toString());
  DocletParam dp4 = dInfo.createParam();
  dp4.setName("-newapidir");
  dp4.setValue(getDestdir().toString());

  // Assume that Javadoc reports already exist in ../"apiname"
  DocletParam dp5 = dInfo.createParam();
  dp5.setName("-javadocold");
  dp5.setValue(".." + DIR_SEP + oldapiname + DIR_SEP);
  DocletParam dp6 = dInfo.createParam();
  dp6.setName("-javadocnew");
  dp6.setValue(".." + DIR_SEP + newapiname + DIR_SEP);
 
  if (getStats()) {
      // There are no arguments to this argument
      dInfo.createParam().setName("-stats");
      // We also have to copy two image files for the stats pages
      copyFile(jdiffHome + DIR_SEP + "black.gif",
         getDestdir().toString() + DIR_SEP + "black.gif");
      copyFile(jdiffHome + DIR_SEP + "background.gif",
         getDestdir().toString() + DIR_SEP + "background.gif");
  }
 
  if (getDocchanges()) {
      // There are no arguments to this argument
      dInfo.createParam().setName("-docchanges");
  }
 
  if (getIncompatible()) {
      // There are no arguments to this argument
      dInfo.createParam().setName("-incompatible");
  }

        if(getScript()) {
            dInfo.createParam().setName("-script");
        }

  // Execute the Javadoc command to compare the two XML files
  jd.perform();
    }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.Javadoc.DocletInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.