Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/AbstractCompilerChain.java39
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java1
2 files changed, 7 insertions, 33 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 7675a8633..94941a280 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
@@ -73,7 +73,6 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp
step2extension.put(QVTU_STEP, "qvtu.qvtcas");
step2extension.put(QVTM_STEP, "qvtm.qvtcas");
step2extension.put(QVTP_STEP, "qvtp.qvtcas");
- step2extension.put(QVTG_STEP, "qvtg.xmi");
step2extension.put(QVTS_STEP, "qvts.xmi");
step2extension.put(QVTI_STEP, "qvtias");
step2extension.put(JAVA_STEP, "java");
@@ -232,41 +231,25 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp
}
}
- protected static class QVTp2QVTgCompilerStep extends AbstractCompilerStep
+ protected static class QVTp2QVTsCompilerStep extends AbstractCompilerStep
{
- public QVTp2QVTgCompilerStep(@NonNull CompilerChain compilerChain) {
- super(compilerChain, QVTG_STEP);
+ public QVTp2QVTsCompilerStep(@NonNull CompilerChain compilerChain) {
+ super(compilerChain, QVTS_STEP);
+ QVTp2QVTs.DEBUG_GRAPHS.setState(getOption(CompilerChain.DEBUG_KEY) == Boolean.TRUE);
}
- public @NonNull Resource execute(@NonNull Resource pResource, @NonNull QVTp2QVTg qvtp2qvtg) throws IOException {
+ public @NonNull RootScheduledRegion execute(@NonNull Resource pResource, @NonNull RootDomainUsageAnalysis domainUsageAnalysis, @NonNull ClassRelationships classRelationships) throws IOException {
CreateStrategy savedStrategy = environmentFactory.setCreateStrategy(QVTcEnvironmentFactory.CREATE_STRATEGY);
try {
+ QVTp2QVTg qvtp2qvtg = new QVTp2QVTg(domainUsageAnalysis, classRelationships);
URI qvtgURI = compilerChain.getURI(QVTS_STEP, URI_KEY);
Resource gResource = createResource(qvtgURI);
Transformation asTransformation = getTransformation(pResource);
- RootDomainUsageAnalysis domainUsageAnalysis = qvtp2qvtg.getDomainUsageAnalysis();
domainUsageAnalysis.analyzeTransformation(asTransformation);
qvtp2qvtg.run(pResource, gResource);
gResource.getContents().add(domainUsageAnalysis.getPrimitiveTypeModel());
saveResource(gResource);
- return gResource;
- }
- finally {
- environmentFactory.setCreateStrategy(savedStrategy);
- }
- }
- }
- protected static class QVTp2QVTsCompilerStep extends AbstractCompilerStep
- {
- public QVTp2QVTsCompilerStep(@NonNull CompilerChain compilerChain) {
- super(compilerChain, QVTS_STEP);
- QVTp2QVTs.DEBUG_GRAPHS.setState(getOption(CompilerChain.DEBUG_KEY) == Boolean.TRUE);
- }
-
- public @NonNull RootScheduledRegion execute(@NonNull Resource gResource, @NonNull QVTp2QVTg qvtp2qvtg) throws IOException {
- CreateStrategy savedStrategy = environmentFactory.setCreateStrategy(QVTcEnvironmentFactory.CREATE_STRATEGY);
- try {
Schedule schedule = getSchedule(gResource);
QVTp2QVTs qvtp2qvts = new QVTp2QVTs(this, environmentFactory, schedule, qvtp2qvtg);
MultiRegion multiRegion = qvtp2qvts.transform();
@@ -419,7 +402,6 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp
protected final @NonNull QVTc2QVTuCompilerStep qvtc2qvtuCompilerStep;
protected final @NonNull QVTu2QVTmCompilerStep qvtu2qvtmCompilerStep;
protected final @NonNull QVTm2QVTpCompilerStep qvtm2qvtpCompilerStep;
- protected final @NonNull QVTp2QVTgCompilerStep qvtp2qvtgCompilerStep;
protected final @NonNull QVTp2QVTsCompilerStep qvtp2qvtsCompilerStep;
protected final @NonNull QVTs2QVTiCompilerStep qvts2qvtiCompilerStep;
protected final @NonNull QVTi2JavaCompilerStep qvti2javaCompilerStep;
@@ -435,7 +417,6 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp
this.qvtc2qvtuCompilerStep = createQVTc2QVTuCompilerStep();
this.qvtu2qvtmCompilerStep = createQVTu2QVTmCompilerStep();
this.qvtm2qvtpCompilerStep = createQVTm2QVTpCompilerStep();
- this.qvtp2qvtgCompilerStep = createQVTp2QVTgCompilerStep();
this.qvtp2qvtsCompilerStep = createQVTp2QVTsCompilerStep();
this.qvts2qvtiCompilerStep = createQVTs2QVTiCompilerStep();
this.qvti2javaCompilerStep = createQVTi2JavaCompilerStep();
@@ -489,10 +470,6 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp
return new QVTm2QVTpCompilerStep(this);
}
- protected @NonNull QVTp2QVTgCompilerStep createQVTp2QVTgCompilerStep() {
- return new QVTp2QVTgCompilerStep(this);
- }
-
protected @NonNull QVTp2QVTsCompilerStep createQVTp2QVTsCompilerStep() {
return new QVTp2QVTsCompilerStep(this);
}
@@ -589,9 +566,7 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp
protected @NonNull ImperativeTransformation qvtp2qvti(@NonNull Resource pResource) throws IOException {
RootDomainUsageAnalysis domainAnalysis = new QVTcoreDomainUsageAnalysis(environmentFactory);
ClassRelationships classRelationships = new ClassRelationships(environmentFactory);
- QVTp2QVTg qvtp2qvtg = new QVTp2QVTg(domainAnalysis, classRelationships);
- Resource gResource = qvtp2qvtgCompilerStep.execute(pResource, qvtp2qvtg);
- RootScheduledRegion rootRegion = qvtp2qvtsCompilerStep.execute(gResource, qvtp2qvtg);
+ RootScheduledRegion rootRegion = qvtp2qvtsCompilerStep.execute(pResource, domainAnalysis, classRelationships);
return qvts2qvtiCompilerStep.execute(rootRegion);
}
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java
index 0015cc307..150d42d77 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/CompilerChain.java
@@ -55,7 +55,6 @@ public interface CompilerChain
public static final @NonNull String GENMODEL_STEP = "GenModel";
public static final @NonNull String JAVA_STEP = "Java";
public static final @NonNull String QVTC_STEP = "QVTc";
- public static final @NonNull String QVTG_STEP = "QVTg";
public static final @NonNull String QVTI_STEP = "QVTi";
public static final @NonNull String QVTM_STEP = "QVTm";
public static final @NonNull String QVTP_STEP = "QVTp";

Back to the top