Skip to content

Instantly share code, notes, and snippets.

@louismrose
Created November 21, 2013 22:22
Show Gist options
  • Save louismrose/7590827 to your computer and use it in GitHub Desktop.
Save louismrose/7590827 to your computer and use it in GitHub Desktop.
Epsilon bug #422295
diff --git a/plugins/org.eclipse.epsilon.egl.engine/src/org/eclipse/epsilon/egl/execute/context/EglContext.java b/plugins/org.eclipse.epsilon.egl.engine/src/org/eclipse/epsilon/egl/execute/context/EglContext.java
index 43a15f1..efaea0c 100644
--- a/plugins/org.eclipse.epsilon.egl.engine/src/org/eclipse/epsilon/egl/execute/context/EglContext.java
+++ b/plugins/org.eclipse.epsilon.egl.engine/src/org/eclipse/epsilon/egl/execute/context/EglContext.java
@@ -34,6 +34,7 @@ import org.eclipse.epsilon.egl.traceability.Template;
import org.eclipse.epsilon.eol.execute.context.EolContext;
import org.eclipse.epsilon.eol.execute.context.IEolContext;
import org.eclipse.epsilon.eol.execute.context.Variable;
+import org.eclipse.epsilon.eol.types.EolClasspathNativeTypeDelegate;
public class EglContext extends EolContext implements IEglContext {
@@ -54,6 +55,8 @@ public class EglContext extends EolContext implements IEglContext {
private IEglContext parentContext;
public EglContext(EglTemplateFactory templateFactory) {
+ super(new EolClasspathNativeTypeDelegate(EglContext.class.getClassLoader()));
+
this.templateFactory = templateFactory;
this.traceManager = new TraceManager(new PositionInParentReporter());
diff --git a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/context/EolContext.java b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/context/EolContext.java
index cab204c..b0a1e0b 100644
--- a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/context/EolContext.java
+++ b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/context/EolContext.java
@@ -41,17 +41,27 @@ public class EolContext implements IEolContext{
protected PrettyPrinterManager prettyPrinterManager = new PrettyPrinterManager();
protected PrintStream outputStream = System.out;
protected PrintStream errorStream = System.err;
- protected IModule module = null;
- protected EolClasspathNativeTypeDelegate classpathNativeTypeDelegate = new EolClasspathNativeTypeDelegate();
- protected List<IToolNativeTypeDelegate> nativeTypeDelegates = new ArrayList(CollectionUtil.asCollection(classpathNativeTypeDelegate));
+ protected IModule module = null;
protected boolean profilingEnabled = false;
protected boolean assertionsEnabled = true;
protected ExtendedProperties extendedProperties = new ExtendedProperties();
protected List<AsyncStatement> asyncStatementsQueque = new ArrayList<AsyncStatement>();
protected PrintStream warningStream = System.out;
protected OperationContributorRegistry methodContributorRegistry = new OperationContributorRegistry();
- protected IPropertyAccessRecorder propertyAccessRecorder = new NullPropertyAccessRecorder();
+ protected IPropertyAccessRecorder propertyAccessRecorder = new NullPropertyAccessRecorder();
+ // The following members are initialised in the constructor
+ protected EolClasspathNativeTypeDelegate classpathNativeTypeDelegate;
+ protected List<IToolNativeTypeDelegate> nativeTypeDelegates;
+ public EolContext() {
+ this(new EolClasspathNativeTypeDelegate());
+ }
+
+ protected EolContext(EolClasspathNativeTypeDelegate classpathNativeTypeDelegate) {
+ this.classpathNativeTypeDelegate = classpathNativeTypeDelegate;
+ this.nativeTypeDelegates = new ArrayList(CollectionUtil.asCollection(classpathNativeTypeDelegate));
+ }
+
public OperationContributorRegistry getOperationContributorRegistry() {
return methodContributorRegistry;
}
@@ -103,9 +113,6 @@ public class EolContext implements IEolContext{
public void setExecutorFactory(ExecutorFactory executorFactory) {
this.executorFactory = executorFactory;
}
-
- public EolContext(){
- }
public ModelRepository getModelRepository() {
return modelRepository;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment