Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Felicien IHIRWE
chess
Commits
3467fc4c
Commit
3467fc4c
authored
Feb 23, 2015
by
Stefano puri
Browse files
added a check to avoid null pointers when selecting pim context
parent
bd233bd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/org.polarsys.chess.m2m/transformations/CHESS_PIM2PSM_Inst_full_VERDE.qvto
View file @
3467fc4c
...
...
@@ -66,6 +66,9 @@ property currentSlot : Slot = null;
main
()
{
log
(
"*** CHESS PIM->PSM transformation ***"
);
log
(
"Performing "
+
analysisType
+
" Analysis"
);
log
(
"Analysis Context is "
+
saAnalysis
);
log
(
"End2End Scenario is "
+
saE2EFlow
);
model
:=
source
.
rootObjects
()
![Model];
MARTEProfile
:=
model
.
getView
(
"ComponentView"
).
getAppliedProfiles
()->
selectOne
(
name
=
"GCM"
).
owner
.
owner
.
oclAsType
(
Profile
);
...
...
@@ -236,8 +239,9 @@ mapping Package::CHGaResourcePlatform2SaAnalysisContext() : Class {
if
(
analysisType
.
equalsIgnoreCase
(
"EndToEnd"
))
then
{
//
EndToEndWorkFlow
for
E2E
Scenario
var
pimContext
:
Class
=
model
.
allOwnedElements
()[
Class
]->
selectOne
(
c
:
Class
|
c
.
qualifiedName
.
equalsIgnoreCase
(
saAnalysis
));
var
pimActivity
:
Activity
=
model
.
allOwnedElements
()[
Activity
]->
selectOne
(
a
:
Activity
|
a
.
qualifiedName
.
equalsIgnoreCase
(
saE2EFlow
));
--
2015
/
02
/
23
-
NP
:
added
a
check
to
avoid
null
pointers
@
c
.
qualifiedName
and
@
a
.
qualifiedName
var
pimContext
:
Class
=
model
.
allOwnedElements
()[
Class
]->
selectOne
(
c
:
Class
|
not
c
.
qualifiedName
.
oclIsUndefined
()
and
c
.
qualifiedName
.
equalsIgnoreCase
(
saAnalysis
));
var
pimActivity
:
Activity
=
model
.
allOwnedElements
()[
Activity
]->
selectOne
(
a
:
Activity
|
not
a
.
qualifiedName
.
oclIsUndefined
()
and
a
.
qualifiedName
.
equalsIgnoreCase
(
saE2EFlow
));
var
interactions
:
Set
(
Interaction
)
:=
model
.
allOwnedElements
()[
Interaction
];
interactions
->
forEach
(
interaction
){
if
(
interaction
.
qualifiedName
.
equalsIgnoreCase
(
scenario
))
then
{
...
...
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