Commit 0388f81f authored by Lionel Seinturier's avatar Lionel Seinturier

Remove usage of JuliacConfig

parent b76a0265
......@@ -68,7 +68,6 @@ import org.objectweb.fractal.julia.type.BasicComponentType;
import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.api.generator.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.StringHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.desc.AbstractADLSupportImpl;
import org.objectweb.fractal.juliac.desc.AttributeDesc;
import org.objectweb.fractal.juliac.desc.BindingDesc;
......@@ -106,8 +105,7 @@ public class EMFParserSupportImpl extends AbstractADLSupportImpl<Composite> {
* being null when the resource is stored in a jar file.
*/
String adlFileName = adl.replace('.','/')+".composite";
JuliacConfig jconf = jc.getJuliacConfig();
ClassLoader loader = jconf.getClassLoader();
ClassLoader loader = jc.getClassLoader();
InputStream is = loader.getResourceAsStream(adlFileName);
boolean exist = (is != null);
return exist;
......@@ -148,8 +146,7 @@ public class EMFParserSupportImpl extends AbstractADLSupportImpl<Composite> {
protected Composite innerparse( String adl, Map<Object,Object> context )
throws IOException {
JuliacConfig jconf = jc.getJuliacConfig();
ClassLoader loader = jconf.getClassLoader();
ClassLoader loader = jc.getClassLoader();
String adlFileName = adl.replace('.','/')+".composite";
URL url = loader.getResource(adlFileName);
......
......@@ -31,7 +31,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.desc.AttributeDesc;
import org.objectweb.fractal.juliac.desc.ComponentDesc;
import org.objectweb.fractal.juliac.module.ADLParserSupportItf;
......@@ -51,7 +50,6 @@ public class EMFParserSupportImplTestCase {
@Before
public void setUp() throws IOException {
jc = new Juliac();
jc.setJuliacConfig(new JuliacConfig());
emfps = new EMFParserSupportImpl();
emfps.init(jc);
}
......
......@@ -133,7 +133,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot();
final String pkgRoot = jc.getPkgRoot();
if( itname.endsWith("-controller") || itname.equals("component") ) {
pcg =
......@@ -172,7 +172,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot();
final String pkgRoot = jc.getPkgRoot();
String itname = it.getFcItfName();
if( itname.endsWith("-controller") || itname.equals("component") ) {
......
......@@ -108,7 +108,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot();
final String pkgRoot = jc.getPkgRoot();
ProxyClassGeneratorItf pcg = null;
String itname = it.getFcItfName();
......@@ -153,7 +153,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot();
final String pkgRoot = jc.getPkgRoot();
String itname = it.getFcItfName();
if( itname.endsWith("-controller") || itname.equals("component") ) {
......
......@@ -142,7 +142,7 @@ extends ClassGenerator {
* Return the name of the class generated by this generator.
*/
public String getTargetTypeName() {
final String pkgRoot = jc.getJuliacConfig().getPkgRoot();
final String pkgRoot = jc.getPkgRoot();
final String targetClassName = pkgRoot + contentClassName + SUFFIX;
return targetClassName;
}
......
......@@ -27,7 +27,6 @@ import java.io.IOException;
import org.junit.Test;
import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.module.JuliacModuleItf;
......@@ -48,8 +47,6 @@ public class FCOOCtrlSourceCodeGeneratorTestCase {
public void testTwoGenerators() throws IOException {
Juliac jc = new Juliac();
JuliacConfig jconf = new JuliacConfig();
jc.setJuliacConfig(jconf);
JuliacModuleItf oo =
new org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment