...
 
Commits (3)
AnnotationGenerationUtils.java 599f568c7e7da8555399ae7ee4eb922cb490effd GREEN
CompArchGeneratonUtil.java 0f1e3c048884fa4df6a35b6a110c46da58f59857 GREEN
DseUtils.java de113a513cce32f8945c126b94e38f7d6f7feb86 GREEN
DseUtils.java 74ba8febd5a74cece21b5dd5ea7673dec7ddc122 GREEN
FileWriterUtil.java 4a95559f571d41fa44e6236fc055ab5baac7c384 GREEN
GraphGenerationUtilities.java e637fd6a38339c60a6a7ac5af116db304266d345 GREEN
GraphMetricUtils.java 99a398d4ff9b15b3eeb35748e32aa34a9b197f07 GREEN
......
......@@ -34,6 +34,7 @@ import static org.fortiss.af3.exploration.util.ModelSnapshotExtractUtils.createT
import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createAllocationPatternExpression;
import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createUtilizationPatternExpression;
import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotationValue;
import static org.fortiss.tooling.common.util.LambdaUtils.firstOfType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
......@@ -66,6 +67,8 @@ import org.fortiss.af3.task.model.Task;
import org.fortiss.af3.task.model.TaskArchitecture;
import org.fortiss.af3.task.model.annotation.FlashRequirement;
import org.fortiss.af3.timing.model.TimingSpecification;
import org.fortiss.tooling.kernel.model.IProjectRootElement;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
/**
* Utility class supporting the interaction with artifacts of the design space exploration.
......@@ -105,16 +108,29 @@ public class DseUtils {
// The created DSE already owns an InitialInputDefinitionStep.
InitialInputDefinitionStep inputDefStep = dse.getInitialStep();
ModelSnapshot caSnap = createComponentArchitectureSnapshot(
Collection<IProjectRootElement> rootElements = new ArrayList<>();
rootElements.add(
pickFirstInstanceOf(ComponentArchitecture.class, af3Project.getRootElements()));
rootElements
.add(pickFirstInstanceOf(PlatformArchitecture.class, af3Project.getRootElements()));
rootElements.add(pickFirstInstanceOf(TaskArchitecture.class, af3Project.getRootElements()));
rootElements.add(
pickFirstInstanceOf(AllocationTableCollection.class, af3Project.getRootElements()));
rootElements
.add(pickFirstInstanceOf(TimingSpecification.class, af3Project.getRootElements()));
Collection<IProjectRootElement> copiedRootElements = EcoreUtils.copy(rootElements);
ModelSnapshot caSnap = createComponentArchitectureSnapshot(
firstOfType(copiedRootElements, ComponentArchitecture.class).get());
ModelSnapshot paSnap = createPlatformArchitectureSnapshot(
pickFirstInstanceOf(PlatformArchitecture.class, af3Project.getRootElements()));
firstOfType(copiedRootElements, PlatformArchitecture.class).get());
ModelSnapshot taSnap = createTaskArchitectureSnapshot(
pickFirstInstanceOf(TaskArchitecture.class, af3Project.getRootElements()));
firstOfType(copiedRootElements, TaskArchitecture.class).get());
ModelSnapshot allocSnap = createAllocationTableCollectionSnapshot(
pickFirstInstanceOf(AllocationTableCollection.class, af3Project.getRootElements()));
firstOfType(copiedRootElements, AllocationTableCollection.class).get());
ModelSnapshot timeSnap = createTimingSpecificationSnapshot(
pickFirstInstanceOf(TimingSpecification.class, af3Project.getRootElements()));
firstOfType(copiedRootElements, TimingSpecification.class).get());
inputDefStep.addSnapshot(caSnap);
inputDefStep.addSnapshot(paSnap);
......