Skip to content

Commit

Permalink
Epsilon 2.5.0 requires an IImportManager
Browse files Browse the repository at this point in the history
We unintentionally broke backwards compatibility by requiring an IImportManager when constructing EglTemplateSpecification objects.

We will reintroduce the old constructor to restore this compatibility (with a deprecation warning), but we might as well use the new version from now on.
  • Loading branch information
agarciadom committed Feb 25, 2024
1 parent a538b7d commit 1223e85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public class StringGeneratingTemplateFactory extends EglTemplateFactory {
@Override
public EglTemplate load(URI resource) throws EglRuntimeException {
try {
return new StringGeneratingTemplate(new StringGeneratingTemplateSpecification(templateCode), context, resource, results, templateCode);
StringGeneratingTemplateSpecification spec = new StringGeneratingTemplateSpecification(templateCode, getImportManager());
return new StringGeneratingTemplate(spec, context, resource, results, templateCode);
} catch (Exception e) {
throw new EglRuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
import org.eclipse.epsilon.egl.internal.IEglModule;
import org.eclipse.epsilon.egl.spec.EglTemplateSpecification;
import org.eclipse.epsilon.egl.traceability.Template;
import org.eclipse.epsilon.eol.IImportManager;

public class StringGeneratingTemplateSpecification extends EglTemplateSpecification {

private final String code;

protected StringGeneratingTemplateSpecification(String code) {
super("Anonymous", new NullFormatter(), new IncrementalitySettings(), Collections.emptyList());
protected StringGeneratingTemplateSpecification(String code, IImportManager importManager) {
super("Anonymous", new NullFormatter(), new IncrementalitySettings(), importManager, Collections.emptyList());
this.code = code;
}

Expand Down

0 comments on commit 1223e85

Please sign in to comment.