public ScalaCompilerTest()

in extscript-core-root/extscript-myfaces/attic/ScalaCompilerTest.java [61:103]


    public ScalaCompilerTest()
    {
        try
        {
            FactoryEngines.getInstance().init();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        //we use a location relative to our current root one to reach the sources
        //because the test also has to be performed outside of maven
        //and the ide cannot cope with resource paths for now
        ClassLoader loader = Thread.currentThread().getContextClassLoader();

        String currentPath = null;

        try
        {
            currentPath = URLDecoder.decode(loader.getResource("./").getPath(), Charset.defaultCharset().toString());
        }
        catch (UnsupportedEncodingException e)
        {
            fail(e.getMessage());
        }

        String sourcePath1 = currentPath + PROBE1;
        String sourcePath2 = currentPath + PROBE2;
        String rootPath = currentPath + RESOURCES;

        sourcePath1 = FilenameUtils.normalize(sourcePath1);
        sourcePath2 = FilenameUtils.normalize(sourcePath2);
        rootPath = FilenameUtils.normalize(rootPath);

        probe1 = new File(sourcePath1);
        probe2 = new File(sourcePath2);
        root = new File(rootPath);

        WeavingContext.getInstance().setConfiguration(new Configuration());
        WeavingContext.getInstance().getConfiguration().addSourceDir(ScriptingConst.ENGINE_TYPE_JSF_SCALA,
                root.getAbsolutePath());

    }