Commit 330c39dc authored by Simon Barner's avatar Simon Barner
Browse files

Include test case ID in DSE root element and initial import step

Issue-Ref: 4048
Issue-Url: https://af3-developer.fortiss.org/issues/4048

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 7a6bfbc1
...@@ -5,4 +5,4 @@ FileWriterUtil.java 4a95559f571d41fa44e6236fc055ab5baac7c384 GREEN ...@@ -5,4 +5,4 @@ FileWriterUtil.java 4a95559f571d41fa44e6236fc055ab5baac7c384 GREEN
GraphGenerationUtilities.java e637fd6a38339c60a6a7ac5af116db304266d345 GREEN GraphGenerationUtilities.java e637fd6a38339c60a6a7ac5af116db304266d345 GREEN
GraphMetricUtils.java 99a398d4ff9b15b3eeb35748e32aa34a9b197f07 GREEN GraphMetricUtils.java 99a398d4ff9b15b3eeb35748e32aa34a9b197f07 GREEN
GraphUtils.java 4d59affe2bab3113f48d1a827ad0bc9599b3439e GREEN GraphUtils.java 4d59affe2bab3113f48d1a827ad0bc9599b3439e GREEN
ProjectUtils.java 4d8a8796f911d22df8ded53f46491284f14d977f GREEN ProjectUtils.java 0228e21e2875a9f7a472bb6ebacdf0574e9c7c10 GREEN
...@@ -29,6 +29,7 @@ import static org.fortiss.af3.timing.utils.TimingModelElementFactory.createEntit ...@@ -29,6 +29,7 @@ import static org.fortiss.af3.timing.utils.TimingModelElementFactory.createEntit
import static org.fortiss.af3.timing.utils.TimingModelElementFactory.createPeriodicConstraint; import static org.fortiss.af3.timing.utils.TimingModelElementFactory.createPeriodicConstraint;
import static org.fortiss.af3.timing.utils.TimingModelElementFactory.createTimingSpecification; import static org.fortiss.af3.timing.utils.TimingModelElementFactory.createTimingSpecification;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy; import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstChildWithType;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.generateAllIDs; import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.generateAllIDs;
import java.io.IOException; import java.io.IOException;
...@@ -40,6 +41,8 @@ import java.util.List; ...@@ -40,6 +41,8 @@ import java.util.List;
import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.URI;
import org.fortiss.af3.allocation.model.AllocationTableCollection; import org.fortiss.af3.allocation.model.AllocationTableCollection;
import org.fortiss.af3.component.model.ComponentArchitecture; import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.exploration.model.project.DSE;
import org.fortiss.af3.exploration.model.project.InitialInputDefinitionStep;
import org.fortiss.af3.platform.model.PlatformArchitecture; import org.fortiss.af3.platform.model.PlatformArchitecture;
import org.fortiss.af3.project.model.FileProject; import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.task.model.Task; import org.fortiss.af3.task.model.Task;
...@@ -158,7 +161,23 @@ public class ProjectUtils { ...@@ -158,7 +161,23 @@ public class ProjectUtils {
for(FileProject fp : fileProjects) { for(FileProject fp : fileProjects) {
generateAllIDs(fp); generateAllIDs(fp);
fp.setName(fp.getName() + "_" + ++projectID); // Set readable name for file project, DSE node and initial import step
String nameSuffix = "_" + ++projectID;
fp.setName(fp.getName() + nameSuffix);
DSE dse = getFirstChildWithType(fp, DSE.class);
if(dse != null) {
dse.setName(dse.getName() + nameSuffix);
InitialInputDefinitionStep inputStep =
getFirstChildWithType(dse, InitialInputDefinitionStep.class);
if(inputStep != null) {
String name = inputStep.getName();
// Get quotation marks right
inputStep.setName(name.substring(0, name.length() - 1) + nameSuffix + "\"");
}
}
// Save project
URI prjURI = createURI(getDefaultGeneralProjectURI() + separator + fp.getName() + "." + URI prjURI = createURI(getDefaultGeneralProjectURI() + separator + fp.getName() + "." +
AF3_PRJ_SUFFIX); AF3_PRJ_SUFFIX);
saveProject(fp, prjURI); saveProject(fp, prjURI);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment