cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/language/programming/java Javac.java
Date Mon, 02 Jul 2001 21:51:39 GMT
vgritsenko    01/07/02 14:51:39

  Modified:    src/org/apache/cocoon/components/language/programming/java
                        Javac.java
  Log:
  Parse modern compiler errors
  
  Revision  Changes    Path
  1.3       +7 -7      xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/Javac.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Javac.java	2001/05/31 17:38:03	1.2
  +++ Javac.java	2001/07/02 21:51:37	1.3
  @@ -26,7 +26,7 @@
    * This class wraps the Sun's Javac Compiler.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.2 $ $Date: 2001/05/31 17:38:03 $
  + * @version $Revision: 1.3 $ $Date: 2001/07/02 21:51:37 $
    * @since 2.0
    */
   
  @@ -130,16 +130,16 @@
       StringTokenizer tokens = new StringTokenizer(error, ":");
       String file = tokens.nextToken();
       if (file.length() == 1) file += ":" + tokens.nextToken();
  +    int line = Integer.parseInt(tokens.nextToken());
   
  -    // FIXME (SM) finish writing a decent parser for modern errors
  -    /*String message = tokens.nextToken();
  -    String context = tokens.nextToken();
  -    String pointer = tokens.nextToken();
  +    String message = tokens.nextToken("\n").substring(1);
  +    String context = tokens.nextToken("\n");
  +    String pointer = tokens.nextToken("\n");
       int startcolumn = pointer.indexOf("^");
       int endcolumn = context.indexOf(" ", startcolumn);
  -    if (endcolumn == -1) endcolumn = context.length();*/
  +    if (endcolumn == -1) endcolumn = context.length();
   
  -    return new CompilerError(error);
  +    return new CompilerError(file, false, line, startcolumn, line, endcolumn, message);
     }
   
     /**
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message