Author: hibou
Date: Fri Mar 4 15:35:43 2011
New Revision: 1078011
URL: http://svn.apache.org/viewvc?rev=1078011&view=rev
Log:
format + indent
Modified:
ant/site/xooki/antlib.xml
Modified: ant/site/xooki/antlib.xml
URL:
http://svn.apache.org/viewvc/ant/site/xooki/antlib.xml?rev=1078011&r1=1078010&r2=1078011&view=diff
==============================================================================
--- ant/site/xooki/antlib.xml (original)
+++ ant/site/xooki/antlib.xml Fri Mar 4 15:35:43 2011
@@ -26,7 +26,7 @@
importClass(java.io.File);
filesets = elements.get("fileset")
- for (j=0; j<filesets.size(); j++) {
+ for (j = 0; j < filesets.size(); j++) {
fs = filesets.get(j);
srcDir = fs.getDir(project);
@@ -35,22 +35,22 @@
srcFiles = ds.getIncludedFiles();
// iterate over that array
- print('processing '+srcFiles.length+' source files...');
- for (i=0; i<srcFiles.length; i++) {
+ print('processing ' + srcFiles.length + ' source files...');
+ for (i = 0; i < srcFiles.length; i++) {
// get the values via Java API
var file = new File(fs.getDir(project), srcFiles[i]);
var basedir = file.getParent();
var filename = file.getName();
- var filepath = srcFiles[i].substring(0,
srcFiles[i].lastIndexOf(project.getProperty("file.separator"))+1);
+ var filepath = srcFiles[i].substring(0,
srcFiles[i].lastIndexOf(project.getProperty("file.separator")) + 1);
if (attributes.get("checkuptodate") == "true") {
- p = "xooki."+file.getAbsolutePath().replace('
','_')+".uptodate";
+ p = "xooki." + file.getAbsolutePath().replace(' ','_') +
".uptodate";
upToDate = project.createTask("uptodate");
upToDate.setProperty(p);
upToDate.setSrcfile(file);
- upToDate.setTargetFile(new
File(attributes.get("destdir")+"/"+filepath+"/"+filename));
+ upToDate.setTargetFile(new File(attributes.get("destdir")
+ "/" + filepath + "/" + filename));
upToDate.perform();
if (project.getProperty(p) != null) {
self.log(srcFiles[i]+" is up to date", 3);
@@ -64,7 +64,7 @@
exec.setTaskName("generate");
exec.createArg().setValue(srcDir+"/xooki/xooki.js");
exec.createArg().setValue(filename);
-
exec.createArg().setValue(attributes.get("destdir")+"/"+filepath);
+ exec.createArg().setValue(attributes.get("destdir") + "/" +
filepath);
if (attributes.get("printerfriendly") == "true") {
exec.createArg().setValue("print");
}
@@ -79,45 +79,45 @@
<attribute name="xookidir"/>
<attribute name="checkUpToDate"/>
<![CDATA[
- importClass(java.io.File);
+ importClass(java.io.File);
- var file = new File(attributes.get("src"));
- var destFile = new File(attributes.get("dest"));
+ var file = new File(attributes.get("src"));
+ var destFile = new File(attributes.get("dest"));
- var xookidir = attributes.get("xookidir");
- if (xookidir == null) {
- xookidir = project.getProperty("basedir") + "/xooki";
- }
-
- var basedir = file.getParent();
- var filename = file.getName();
-
- var perform = true;
-
- if (attributes.get("checkuptodate") == "true") {
- p = "xooki."+file.getAbsolutePath().replace('
','_')+".uptodate";
- upToDate = project.createTask("uptodate");
- upToDate.setProperty(p);
- upToDate.setSrcfile(file);
- upToDate.setTargetFile(destFile);
- upToDate.perform();
- if (project.getProperty(p) != null) {
- self.log(file+" is up to date", 3);
- perform = false;
- }
+ var xookidir = attributes.get("xookidir");
+ if (xookidir == null) {
+ xookidir = project.getProperty("basedir") + "/xooki";
+ }
+
+ var basedir = file.getParent();
+ var filename = file.getName();
+
+ var perform = true;
+
+ if (attributes.get("checkuptodate") == "true") {
+ p = "xooki." + file.getAbsolutePath().replace(' ', '_') +
".uptodate";
+ upToDate = project.createTask("uptodate");
+ upToDate.setProperty(p);
+ upToDate.setSrcfile(file);
+ upToDate.setTargetFile(destFile);
+ upToDate.perform();
+ if (project.getProperty(p) != null) {
+ self.log(file + " is up to date", 3);
+ perform = false;
}
+ }
- if (perform) {
+ if (perform) {
exec = project.createTask("exec");
exec.setDir(new File(basedir));
exec.setExecutable("jrunscript");
exec.setTaskName("print");
- exec.createArg().setValue(xookidir+"/xooki.js");
+ exec.createArg().setValue(xookidir + "/xooki.js");
exec.createArg().setValue(filename);
exec.createArg().setValue(destFile);
exec.createArg().setValue("print");
exec.perform();
- }
+ }
]]>
</scriptdef>
</antlib>
\ No newline at end of file