diff options
author | Ed Willink | 2016-10-28 15:25:46 +0000 |
---|---|---|
committer | Ed Willink | 2016-10-29 17:36:18 +0000 |
commit | 10bff90c6e36012238febe96f3ec8e762376d1a1 (patch) | |
tree | 4c742376626a837ec49ac6cc8edc3808a7c1c1a3 /plugins | |
parent | 35256f3026240a332aeae8ad1b8016cf82ee79d4 (diff) | |
download | org.eclipse.qvtd-10bff90c6e36012238febe96f3ec8e762376d1a1.tar.gz org.eclipse.qvtd-10bff90c6e36012238febe96f3ec8e762376d1a1.tar.xz org.eclipse.qvtd-10bff90c6e36012238febe96f3ec8e762376d1a1.zip |
[506716] Simplify qvtp2qvts step
Diffstat (limited to 'plugins')
4 files changed, 6 insertions, 9 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 94941a280..2ece8bd7d 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 @@ -251,7 +251,7 @@ public abstract class AbstractCompilerChain extends CompilerUtil implements Comp saveResource(gResource); Schedule schedule = getSchedule(gResource); - QVTp2QVTs qvtp2qvts = new QVTp2QVTs(this, environmentFactory, schedule, qvtp2qvtg); + QVTp2QVTs qvtp2qvts = new QVTp2QVTs(this, environmentFactory, schedule, qvtp2qvtg, domainUsageAnalysis); MultiRegion multiRegion = qvtp2qvts.transform(); throwCompilerChainExceptionForErrors(); String rootName = ClassUtil.nonNullState(qvtp2qvts.getDependencyGraph().eResource().getURI().trimFileExtension().trimFileExtension().lastSegment()); diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTg.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTg.java index 27ab32724..f87f6c607 100644 --- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTg.java +++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTg.java @@ -651,10 +651,6 @@ public class QVTp2QVTg { return result; } - public @NonNull RootDomainUsageAnalysis getDomainUsageAnalysis() { - return domainUsageAnalysis; - } - private org.eclipse.ocl.pivot.Class getElementClass(TypedElement tElement) { Type type = tElement.getType(); if (type instanceof CollectionType) { diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTs.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTs.java index 8328ee299..ab17ce2b6 100644 --- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTs.java +++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/QVTp2QVTs.java @@ -36,6 +36,7 @@ import org.eclipse.qvtd.compiler.CompilerConstants; import org.eclipse.qvtd.compiler.CompilerProblem; import org.eclipse.qvtd.compiler.ProblemHandler; import org.eclipse.qvtd.compiler.internal.qvts2qvts.Region2Depth; +import org.eclipse.qvtd.pivot.qvtcore.analysis.RootDomainUsageAnalysis; import org.eclipse.qvtd.pivot.schedule.AbstractAction; import org.eclipse.qvtd.pivot.schedule.ClassDatum; import org.eclipse.qvtd.pivot.schedule.MappingAction; @@ -69,8 +70,8 @@ public class QVTp2QVTs extends SchedulerConstants private final @NonNull List<@NonNull AbstractAction> orderedActions; - public QVTp2QVTs(@NonNull ProblemHandler problemHandler, @NonNull EnvironmentFactory environmentFactory, @NonNull Schedule schedule, @NonNull QVTp2QVTg qvtp2qvtg) { - super(environmentFactory, schedule, qvtp2qvtg); + public QVTp2QVTs(@NonNull ProblemHandler problemHandler, @NonNull EnvironmentFactory environmentFactory, @NonNull Schedule schedule, @NonNull QVTp2QVTg qvtp2qvtg, @NonNull RootDomainUsageAnalysis domainAnalysis) { + super(environmentFactory, schedule, qvtp2qvtg, domainAnalysis); this.problemHandler = problemHandler; DependencyUtil.NaturalOrderer orderer = new DependencyUtil.NaturalOrderer(schedule); List<@NonNull AbstractAction> orderedActions = orderer.computeOrdering(); // FIXME ??is this ordering still needed?? diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/SchedulerConstants.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/SchedulerConstants.java index 370e272e3..f77b18db7 100644 --- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/SchedulerConstants.java +++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/SchedulerConstants.java @@ -136,10 +136,10 @@ public abstract class SchedulerConstants private /*@LazyNonNull */ DependencyAnalyzer dependencyAnalyzer = null; - public SchedulerConstants(@NonNull EnvironmentFactory environmentFactory, @NonNull Schedule dependencyGraph, @NonNull QVTp2QVTg qvtp2qvtg) { + protected SchedulerConstants(@NonNull EnvironmentFactory environmentFactory, @NonNull Schedule dependencyGraph, @NonNull QVTp2QVTg qvtp2qvtg, @NonNull RootDomainUsageAnalysis domainAnalysis) { this.environmentFactory = environmentFactory; this.dependencyGraph = dependencyGraph; - this.domainAnalysis = qvtp2qvtg.getDomainUsageAnalysis(); + this.domainAnalysis = domainAnalysis; this.qvtp2qvtg = qvtp2qvtg; this.transformation = ClassUtil.nonNullState(QVTbaseUtil.getContainingTransformation(((MappingAction)dependencyGraph.getActions().get(0)).getMapping())); // |