Nice/src/bossa/modules DirectorySourceContent.java,1.3,1.4 Compilation.nice,1.33,1.34 Compilation.java,1.12,1.13

Artem Gr Kozarezov <[email protected]> Sat, 27 Aug 2005 14:04:43 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7184/src/bossa/modules

Modified Files:
	DirectorySourceContent.java Compilation.nice Compilation.java 
Log Message:
RFE 1076945: source charset encoding made configurable.

Index: DirectorySourceContent.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/modules/DirectorySourceContent.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DirectorySourceContent.java	2 Jul 2004 19:31:03 -0000	1.3
--- DirectorySourceContent.java	27 Aug 2005 14:04:40 -0000	1.4
***************
*** 120,123 ****
--- 120,134 ----
    {
      try{
+       String encoding = pkg.compilation.sourceEncoding;
+       if(encoding != null) try{
+         FileInputStream fis = new FileInputStream(f);
+         // No need to wrap the FileInputStream with BufferedInputStream here:
+         // InputStreamReader already contains an input buffer, both in Sun and GNU implementations.
+         InputStreamReader isr = new InputStreamReader(fis, encoding);
+         return new BufferedReader(isr);
+       }catch(UnsupportedEncodingException badEncoding){
+         User.warning("Encoding '" + encoding + "' was rejected while reading " +
+                      nice.tools.util.System.prettyPrint(f));
+       }
        return new BufferedReader(new FileReader(f));
      }

Index: Compilation.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/modules/Compilation.nice,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** Compilation.nice	5 Apr 2005 12:50:03 -0000	1.33
--- Compilation.nice	27 Aug 2005 14:04:40 -0000	1.34
***************
*** 34,37 ****
--- 34,38 ----
  
    String sourcePath = ".";
+   public ?String sourceEncoding = null;
    ?String packagePath = null;
    ?String destinationDir = null;

Index: Compilation.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/modules/Compilation.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Compilation.java	11 Mar 2005 17:35:54 -0000	1.12
--- Compilation.java	27 Aug 2005 14:04:40 -0000	1.13
***************
*** 25,28 ****
--- 25,29 ----
  
    public String sourcePath;
+   public String sourceEncoding;
    public String packagePath;
    public String destinationDir;



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf