Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/PortMessageSelectionDialog.java')
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/PortMessageSelectionDialog.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/PortMessageSelectionDialog.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/PortMessageSelectionDialog.java
index eb171c451..38b0f53b9 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/PortMessageSelectionDialog.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/PortMessageSelectionDialog.java
@@ -17,6 +17,7 @@ import java.util.HashMap;
import java.util.List;
import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.CommunicationType;
import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.Message;
import org.eclipse.etrice.core.room.PortClass;
@@ -109,7 +110,7 @@ public class PortMessageSelectionDialog extends FormDialog {
pairs.add(new MsgItemPair(item, msg, true));
}
}
- if (ac.getStateMachine().isDataDriven()) {
+ if (item.getProtocol().getCommType()==CommunicationType.DATA_DRIVEN) {
List<Message> in = RoomHelpers.getMessageList(item, false);
for (Message msg : in) {
if (!msg.isPriv())
@@ -156,11 +157,12 @@ public class PortMessageSelectionDialog extends FormDialog {
@Override
public boolean hasChildren(Object element) {
if (element instanceof InterfaceItem) {
- if (!RoomHelpers.getMessageList(((InterfaceItem)element), true).isEmpty())
+ InterfaceItem item = (InterfaceItem)element;
+ if (!RoomHelpers.getMessageList(item, true).isEmpty())
return true;
- if (ac.getStateMachine().isDataDriven())
- if (!RoomHelpers.getMessageList(((InterfaceItem)element), false).isEmpty())
+ if (item.getProtocol().getCommType()==CommunicationType.DATA_DRIVEN)
+ if (!RoomHelpers.getMessageList(item, false).isEmpty())
return true;
}

Back to the top