X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph.compiler%2Ftests%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Ftests%2FTestCompiler.java;h=f878068ec8e15aa6065eefa13105f6e7f01733e3;hb=6b5821ad728bf2f127091cb36d57b87749a6532f;hp=0557c0ccf35ed7011df7efb30600bbffa326d2ae;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph.compiler/tests/org/simantics/graph/compiler/tests/TestCompiler.java b/bundles/org.simantics.graph.compiler/tests/org/simantics/graph/compiler/tests/TestCompiler.java index 0557c0ccf..f878068ec 100644 --- a/bundles/org.simantics.graph.compiler/tests/org/simantics/graph/compiler/tests/TestCompiler.java +++ b/bundles/org.simantics.graph.compiler/tests/org/simantics/graph/compiler/tests/TestCompiler.java @@ -1,36 +1,36 @@ -package org.simantics.graph.compiler.tests; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; - -import org.simantics.graph.compiler.ExternalFileLoader; -import org.simantics.graph.compiler.GraphCompiler; -import org.simantics.graph.compiler.GraphCompilerPreferences; -import org.simantics.graph.representation.TransferableGraph1; -import org.simantics.ltk.FileSource; -import org.simantics.ltk.ISource; - -public class TestCompiler { - - public static void main(String[] args) throws Exception { - Collection sources = new ArrayList(); - File dir = new File("d:/apros6/org.simantics.layer0/graph"); - for(File f : dir.listFiles()) - if(f.getName().endsWith(".pgraph")) - sources.add(new FileSource(f)); - GraphCompiler.compile("1.0", sources, - Collections.emptyList(), - new ExternalFileLoader() { - @Override - public byte[] load(String fileName) throws IOException { - throw new FileNotFoundException(); - } - }, - new GraphCompilerPreferences()); - } - -} +package org.simantics.graph.compiler.tests; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; + +import org.simantics.graph.compiler.ExternalFileLoader; +import org.simantics.graph.compiler.GraphCompiler; +import org.simantics.graph.compiler.GraphCompilerPreferences; +import org.simantics.graph.compiler.internal.ltk.FileSource; +import org.simantics.graph.compiler.internal.ltk.ISource; +import org.simantics.graph.representation.TransferableGraph1; + +public class TestCompiler { + + public static void main(String[] args) throws Exception { + Collection sources = new ArrayList(); + File dir = new File("d:/apros6/org.simantics.layer0/graph"); + for(File f : dir.listFiles()) + if(f.getName().endsWith(".pgraph")) + sources.add(new FileSource(f)); + GraphCompiler.compile("1.0", sources, + Collections.emptyList(), + new ExternalFileLoader() { + @Override + public byte[] load(String fileName) throws IOException { + throw new FileNotFoundException(); + } + }, + new GraphCompilerPreferences()); + } + +}