]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Enabling ResourceFile CR filtering based on locale 06/406/1
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Wed, 5 Apr 2017 13:40:35 +0000 (16:40 +0300)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Wed, 5 Apr 2017 13:40:35 +0000 (16:40 +0300)
Change-Id: Ia16ff6a5fd090aca4f679a1d5aa1e5ae2590b37d

bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/resourceFiles/ResourceFile.java

index d9d155037e1eadd3b624cca948bcd95394676afb..a847dbee130e61fb4ab6ea84a17afa14020ee9f8 100644 (file)
@@ -91,7 +91,7 @@ public class ResourceFile implements IResourceFile {
        @Override
        public InputStream getContent() {
                StringWriter writer = new StringWriter();
-               write(new FilterCRWriter(writer));
+               write(String.format("%n").length() == 1 ? new FilterCRWriter(writer) : writer);
                return new ByteArrayInputStream(writer.toString().getBytes(UTF8));
        }
        
@@ -108,11 +108,12 @@ public class ResourceFile implements IResourceFile {
        }
        
        public static void main(String[] args) {
-               ResourceRef Foo = new ResourceRef("Foo", "http://www.dsf.sdf/Foo");
+               /*ResourceRef Foo = new ResourceRef("Foo", "http://www.dsf.sdf/Foo");
                ResourceRef Bar = new ResourceRef("Foo", "http://www.dsf.sdf/Bar");
                Bar.deprecated = true;
                new ResourceFile("org.simantics.graph", "Testi", Arrays.<ResourceRef>asList(
                                Foo, Bar
-                       )).write(new OutputStreamWriter(System.out));
+                       )).write(new OutputStreamWriter(System.out));*/
+           System.out.println(String.format("%n").length());
        }
 }