Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2021-04-04 09:31:21 +0000
committerEd Willink2021-04-04 09:31:21 +0000
commit1fa1a03da60a467d05474f0d3e0bdbf89f67c5c0 (patch)
tree7ca67fba041b39c1c448c8a3fd2051829b261f2d
parent545efba2ec2258f57c7fe4b57dd7259b466daa34 (diff)
downloadorg.eclipse.qvtd-ewillink/571846.tar.gz
org.eclipse.qvtd-ewillink/571846.tar.xz
org.eclipse.qvtd-ewillink/571846.zip
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java2
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java16
2 files changed, 10 insertions, 8 deletions
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java
index f957151aa..381a76ad7 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java
@@ -446,7 +446,7 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp
@Override
protected @NonNull QVTimperativeEnvironmentFactory createEnvironmentFactory() {
QVTimperativeEnvironmentFactory environmentFactory = super.createEnvironmentFactory();
- configureGeneratedPackages();
+ configureGeneratedPackages(environmentFactory);
return environmentFactory;
}
diff --git a/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java b/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java
index e68c30378..a782cc607 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtbase.tests/src/org/eclipse/qvtd/xtext/qvtbase/tests/AbstractTestQVT.java
@@ -522,11 +522,12 @@ public abstract class AbstractTestQVT extends QVTimperative
AbstractTestThread<Object, @NonNull EnvironmentFactoryInternal, @Nullable OCLInternal> checkThread = new AbstractTestThread<Object, @NonNull EnvironmentFactoryInternal, @Nullable OCLInternal>("QVTi-ScheduleLoadCheck", environmentThreadFactory)
{
@Override
- protected void configureGeneratedPackages() {
- super.configureGeneratedPackages();
- configureGeneratedPackage(QVTbasePackage.eNS_URI);
- configureGeneratedPackage(QVTtemplatePackage.eNS_URI);
- configureGeneratedPackage(QVTrelationPackage.eNS_URI);
+ protected void configureGeneratedPackages(@NonNull EnvironmentFactory environmentFactory) {
+ super.configureGeneratedPackages(environmentFactory);
+ ResourceSet resourceSet = environmentFactory.getResourceSet();
+ configureGeneratedPackage(resourceSet, QVTbasePackage.eNS_URI);
+ configureGeneratedPackage(resourceSet, QVTtemplatePackage.eNS_URI);
+ configureGeneratedPackage(resourceSet, QVTrelationPackage.eNS_URI);
}
@Override
@@ -539,9 +540,10 @@ public abstract class AbstractTestQVT extends QVTimperative
@Override
public Object runWithThrowable() throws Exception {
// assert ocl != null;
- ResourceSet resourceSet = getEnvironmentFactory().getResourceSet();
+ EnvironmentFactoryInternal environmentFactory = getEnvironmentFactory();
+ ResourceSet resourceSet = environmentFactory.getResourceSet();
getProjectManager().initializeResourceSet(resourceSet);
- configureGeneratedPackages();
+ configureGeneratedPackages(environmentFactory);
Resource resource = resourceSet.getResource(uri, true);
assert resource != null;
PivotTestCase.assertNoResourceErrors("Load", resource);

Back to the top