Commit 0b21b78f authored by Simon Barner's avatar Simon Barner
Browse files

- Remove all model elements that have been migrated

- Set to 'null' all EReferences that have been migrated
refs 3067
parent 7f73d9e2
TaskArchitectureMigration.java 6d2133f2c01d9c8161763b170b62916e144d53a8 YELLOW
TaskArchitectureMigration.java 79d81d1dc88066b6b9d0576aab85a755f3f611ba YELLOW
......@@ -163,6 +163,7 @@ public class TaskArchitectureMigration implements IMigrationProvider {
Period period = getAnnotation(task, Period.class, false);
migrateIAnnotatedSpecification(taskPeriod, period);
period.setValue(valueOf(taskPeriod.getPeriod()));
delete(taskPeriod);
}
TaskDuration taskDuration =
......@@ -171,6 +172,7 @@ public class TaskArchitectureMigration implements IMigrationProvider {
Wcet wcet = getAnnotation(task, Wcet.class, false);
migrateIAnnotatedSpecification(taskDuration, wcet);
wcet.setValue(valueOf(taskDuration.getDuration()));
delete(taskDuration);
}
TaskStartTime taskStartTime =
......@@ -204,8 +206,8 @@ public class TaskArchitectureMigration implements IMigrationProvider {
resourceAllocation.setSchedulableEntity(schedulableEntity);
}
}
delete(taskStartTime);
}
}
// Migrate task ports, including logical port to task port mapping
......@@ -249,23 +251,29 @@ public class TaskArchitectureMigration implements IMigrationProvider {
Port port = null;
// Migrate logical port to task port mapping
if(oldTaskPort instanceof OutputSignalPort &&
((OutputSignalPort)oldTaskPort).getOutputPortReference() != null) {
ComponentToTaskAllocationTable ca2ta =
getOrCreateComponentToTaskAllocationTable(fileProject, taskArch);
port = ((OutputSignalPort)oldTaskPort).getOutputPortReference();
addAllocationEntry(ca2ta, InputPortToTaskInputPortAllocationEntry.class, port,
newTaskPort);
} else if(oldTaskPort instanceof InputSignalPort &&
((InputSignalPort)oldTaskPort).getInputPortReference() != null) {
ComponentToTaskAllocationTable ca2ta =
getOrCreateComponentToTaskAllocationTable(fileProject, taskArch);
port = ((InputSignalPort)oldTaskPort).getInputPortReference();
addAllocationEntry(ca2ta, InputPortToTaskInputPortAllocationEntry.class, port,
newTaskPort);
if(oldTaskPort instanceof InputBufferedSignalPort) {
bufferSize = ((InputBufferedSignalPort)oldTaskPort).getBufferSize();
if(oldTaskPort instanceof OutputSignalPort) {
OutputSignalPort outputSignalPort = (OutputSignalPort)oldTaskPort;
if(outputSignalPort.getOutputPortReference() != null) {
ComponentToTaskAllocationTable ca2ta =
getOrCreateComponentToTaskAllocationTable(fileProject, taskArch);
port = outputSignalPort.getOutputPortReference();
addAllocationEntry(ca2ta, InputPortToTaskInputPortAllocationEntry.class, port,
newTaskPort);
outputSignalPort.setOutputPortReference(null);
}
} else if(oldTaskPort instanceof InputSignalPort) {
InputSignalPort inputSignalPort = (InputSignalPort)oldTaskPort;
if(inputSignalPort.getInputPortReference() != null) {
ComponentToTaskAllocationTable ca2ta =
getOrCreateComponentToTaskAllocationTable(fileProject, taskArch);
port = inputSignalPort.getInputPortReference();
addAllocationEntry(ca2ta, InputPortToTaskInputPortAllocationEntry.class, port,
newTaskPort);
if(inputSignalPort instanceof InputBufferedSignalPort) {
bufferSize = ((InputBufferedSignalPort)inputSignalPort).getBufferSize();
}
inputSignalPort.setInputPortReference(null);
}
}
......
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