buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java Wed Jun 16 16:51:40 2010 +0300
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java Fri Aug 13 14:59:05 2010 +0300
@@ -18,12 +18,12 @@
import java.io.File;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.io.IOException;
import org.apache.tools.ant.BuildException;
import org.dom4j.Document;
@@ -127,19 +127,22 @@
PrintWriter output = new PrintWriter(new FileOutputStream(file));
for (String line : text.split("\n")) {
- if (line.trim().startsWith("import"))
+ if (line.trim().startsWith("import")) {
output.write(line + "\n");
+ }
}
output.write("/**\n * x\n */\npublic final class " + scriptdefname
+ " {\n");
- output.write("private " + scriptdefname + "() { }\n");
- output.write("public static void main(String[] args) {\n");
+ output.write(" private " + scriptdefname + "() { }\n");
+ output.write(" public static void main(String[] args) {\n");
for (String line : text.split("\n")) {
- if (!line.trim().startsWith("import"))
- output.write(line + "\n");
+ if (!line.trim().startsWith("import")) {
+ output.write(" " + line + "\n");
+ }
}
- output.write("} }");
+ output.write(" }\n");
+ output.write("}\n");
output.close();
} catch (IOException e) {
throw new BuildException("Not able to write Beanshell File "