incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r425239 - /incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompiler.java
Date Tue, 25 Jul 2006 00:51:12 GMT
Author: matzew
Date: Mon Jul 24 17:51:11 2006
New Revision: 425239

URL: http://svn.apache.org/viewvc?rev=425239&view=rev
Log:
fix ?

Modified:
    incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompiler.java
  (contents, props changed)

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompiler.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompiler.java?rev=425239&r1=425238&r2=425239&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompiler.java
(original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompiler.java
Mon Jul 24 17:51:11 2006
@@ -13,96 +13,94 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-package org.apache.myfaces.trinidadbuild.plugin.javascript.javascriptcompiler;
-
-import java.io.BufferedOutputStream;
-
-import org.apache.myfaces.trinidadbuild.plugin.javascript.uixtools.FileProcessor;
-import org.apache.myfaces.trinidadbuild.plugin.javascript.javascript20parser.JSParser20;
-import org.apache.myfaces.trinidadbuild.plugin.javascript.javascript20parser.Token;
-import org.apache.myfaces.trinidadbuild.plugin.javascript.javascript20parser.ParseException;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStreamReader;
-import java.io.InputStream;
-import java.io.PrintStream;
-
-import java.util.HashMap;
-
-public class JavascriptCompiler extends FileProcessor
-{
-  private JSParser20        _jsParser;
-  public  HashMap<String, String>         fileTable;
-
-  public JavascriptCompiler()
-  {
-    super("js", false);
-    fileTable = new HashMap<String,String>();
-  }
-
-  private void init(InputStream in)
-  {
-    // apply overrides
-  }
-
-  protected void processFile(File in, File out)
-    throws Exception
-  {
-    String className, newClassName;
-    FileInputStream inStream = new FileInputStream(in);
-    //
-    //  Get the name of the file
-    //
-    className = in.getName();
-    className = className.substring(0, className.indexOf('.'));
-    //
-    //  Check to see if the name exists as we do not want to over write the four
-    //  special names we are using.
-    //
-    newClassName = fileTable.get(className);
-    if ( newClassName == null) 
-    {
-//       newClassName = "Adf" + className;
-//      fileTable.put(className, newClassName);
-      newClassName = className;
-    }
-    out = new File(out.getParentFile(), newClassName + ".js");
-    PrintStream outStream = new PrintStream(new BufferedOutputStream(new FileOutputStream(out)));
-    process(inStream, outStream);
-    inStream.close();
-    outStream.flush();
-    outStream.close();
-  }
-  private void initParser(InputStream in)
-  {
-
-    if (_jsParser == null)
-    {
-      _jsParser = new JSParser20(in);
-    }
-    else
-    {
-      _jsParser.ReInit(new InputStreamReader(in));
-    }
-  }
-  public void process(InputStream in, PrintStream o) throws ParseException
-  {
-    Token token = null;
-    DepthFirstTraversal vstr;
-    init(in);
-    token = tokenize(in);
-    //
-    //   Create an instance of DepthFirstTraversal
-    //
-    vstr = new DepthFirstTraversal(o, fileTable); 
-    _jsParser.getRootNode().jjtAccept(vstr, null);
-  }
-  private Token tokenize(InputStream in) throws ParseException
-  {
-    initParser(in);
-    return (Token) _jsParser.Program();
-  }
-
-}
+import java.io.BufferedOutputStream;
+
+import org.apache.myfaces.trinidadbuild.plugin.javascript.uixtools.FileProcessor;
+import org.apache.myfaces.trinidadbuild.plugin.javascript.javascript20parser.JSParser20;
+import org.apache.myfaces.trinidadbuild.plugin.javascript.javascript20parser.Token;
+import org.apache.myfaces.trinidadbuild.plugin.javascript.javascript20parser.ParseException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStreamReader;
+import java.io.InputStream;
+import java.io.PrintStream;
+
+import java.util.HashMap;
+
+public class JavascriptCompiler extends FileProcessor
+{
+  private JSParser20        _jsParser;
+  public  HashMap<String, String>         fileTable;
+
+  public JavascriptCompiler()
+  {
+    super("js", false);
+    fileTable = new HashMap<String,String>();
+  }
+
+  private void init(InputStream in)
+  {
+    // apply overrides
+  }
+
+  protected void processFile(File in, File out)
+    throws Exception
+  {
+    String className, newClassName;
+    FileInputStream inStream = new FileInputStream(in);
+    //
+    //  Get the name of the file
+    //
+    className = in.getName();
+    className = className.substring(0, className.indexOf('.'));
+    //
+    //  Check to see if the name exists as we do not want to over write the four
+    //  special names we are using.
+    //
+    newClassName = fileTable.get(className);
+    if ( newClassName == null) 
+    {
+//       newClassName = "Adf" + className;
+//      fileTable.put(className, newClassName);
+      newClassName = className;
+    }
+    out = new File(out.getParentFile(), newClassName + ".js");
+    PrintStream outStream = new PrintStream(new BufferedOutputStream(new FileOutputStream(out)));
+    process(inStream, outStream);
+    inStream.close();
+    outStream.flush();
+    outStream.close();
+  }
+  private void initParser(InputStream in)
+  {
+
+    if (_jsParser == null)
+    {
+      _jsParser = new JSParser20(in);
+    }
+    else
+    {
+      _jsParser.ReInit(new InputStreamReader(in));
+    }
+  }
+  public void process(InputStream in, PrintStream o) throws ParseException
+  {
+    Token token = null;
+    DepthFirstTraversal vstr;
+    init(in);
+    token = tokenize(in);
+    //
+    //   Create an instance of DepthFirstTraversal
+    //
+    vstr = new DepthFirstTraversal(o, fileTable); 
+    _jsParser.getRootNode().jjtAccept(vstr, null);
+  }
+  private Token tokenize(InputStream in) throws ParseException
+  {
+    initParser(in);
+    return (Token) _jsParser.Program();
+  }
+
+}

Propchange: incubator/adffaces/branches/matzew-repackaging-trinidad/plugins/maven-javascript-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/javascript/javascriptcompiler/JavascriptCompiler.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message