aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2018-01-26 10:26:52 -0500
committerJuergen Haug2018-01-26 10:27:43 -0500
commit1ca0c386ea828f6829a7f33482f79a20deb31b2e (patch)
treec15b540f27c70b79af754c9f36a9edb5a9013539
parent0244feb1005edfc61a004d94220837dbc4a9bfa6 (diff)
downloadorg.eclipse.etrice-1ca0c386ea828f6829a7f33482f79a20deb31b2e.tar.gz
org.eclipse.etrice-1ca0c386ea828f6829a7f33482f79a20deb31b2e.tar.xz
org.eclipse.etrice-1ca0c386ea828f6829a7f33482f79a20deb31b2e.zip
[room.ui] fixed NPE in detail expressions
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/src/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.xtend16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/org.eclipse.etrice.expressions.ui/src/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.xtend b/plugins/org.eclipse.etrice.expressions.ui/src/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.xtend
index 7377b73de..b9a21d899 100644
--- a/plugins/org.eclipse.etrice.expressions.ui/src/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.xtend
+++ b/plugins/org.eclipse.etrice.expressions.ui/src/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.xtend
@@ -56,13 +56,15 @@ class GuardDetailExpressionProvider implements IDetailExpressionProvider {
if(transitionEventData !== null) {
scope += transitionEventData.createExprFeature(IDetailExpressionProvider.ExpressionPostfix.NONE)
}
- scope += actorClass.allInterfaceItems.filter[isEventDriven || !isConjugated].map[
- switch it {
- Port case isReplicated: createExprFeature(IDetailExpressionProvider.ExpressionPostfix.BRACKETS)
- default: createExprFeature(IDetailExpressionProvider.ExpressionPostfix.NONE)
- }]
- scope += actorClass.latestOperations.map[createExprFeature]
- scope += actorClass.allAttributes.map[createExprFeature]
+ if(actorClass !== null) {
+ scope += actorClass.allInterfaceItems.filter[isEventDriven || !isConjugated].map[
+ switch it {
+ Port case isReplicated: createExprFeature(IDetailExpressionProvider.ExpressionPostfix.BRACKETS)
+ default: createExprFeature(IDetailExpressionProvider.ExpressionPostfix.NONE)
+ }]
+ scope += actorClass.latestOperations.map[createExprFeature]
+ scope += actorClass.allAttributes.map[createExprFeature]
+ }
return scope.filterNull.filter[id !== null].toList
}