Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
0b21b78f
Commit
0b21b78f
authored
Jan 26, 2018
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.task/trunk/src/org/fortiss/af3/task/model/migration/.ratings
View file @
0b21b78f
TaskArchitectureMigration.java
6d2133f2c0
1d
9
c8
161763b170b62916e144d53a8
YELLOW
TaskArchitectureMigration.java
79d81d
1dc8
8066b6b9d0576aab85a755f3f611ba
YELLOW
org.fortiss.af3.task/trunk/src/org/fortiss/af3/task/model/migration/TaskArchitectureMigration.java
View file @
0b21b78f
...
...
@@ -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
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment