diff options
author | Henrik Rentz-Reichert | 2014-11-07 10:22:36 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2014-11-07 10:22:36 +0000 |
commit | 539e5465529fe549268cb38bd90578d5c130b7de (patch) | |
tree | aeaf3cfeae1e246a00a5f646b5ac0bb0f6f9671c /plugins/org.eclipse.etrice.ui.behavior | |
parent | 054aa3dc1288c8b1d23d7fcd4895f629bd91b51e (diff) | |
download | org.eclipse.etrice-539e5465529fe549268cb38bd90578d5c130b7de.tar.gz org.eclipse.etrice-539e5465529fe549268cb38bd90578d5c130b7de.tar.xz org.eclipse.etrice-539e5465529fe549268cb38bd90578d5c130b7de.zip |
Bug 449871 - Message Dialog box without Port Operations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=449871
fixed a bug in the list's content provider
Change-Id: I706f8c2c6001793b3366c6ee3c2e857c430c8425
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.behavior')
-rw-r--r-- | plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/dialogs/PortMessageSelectionDialog.java | 10 |
1 files changed, 3 insertions, 7 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 a7c61a867..e7409033c 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 @@ -123,10 +123,12 @@ public class PortMessageSelectionDialog extends FormDialog implements ISelection } PortClass pcls = roomHelpers.getPortClass(item); if (pcls!=null) { + // first add messages that are 'send' messages for (PortOperation op : pcls.getOperations()) { if (op.getSendsMsg()!=null) pairs.add(new OperationItemPair(item, op)); } + // then add all others for (PortOperation op : pcls.getOperations()) { if (op.getSendsMsg()==null) pairs.add(new OperationItemPair(item, op)); @@ -161,13 +163,7 @@ public class PortMessageSelectionDialog extends FormDialog implements ISelection @Override public boolean hasChildren(Object element) { if (element instanceof InterfaceItem) { - InterfaceItem item = (InterfaceItem)element; - if (!SupportUtil.getInstance().getRoomHelpers().getMessageListDeep(item, true).isEmpty()) - return true; - - if (SupportUtil.getInstance().getRoomHelpers().getProtocol(item).getCommType()==CommunicationType.DATA_DRIVEN) - if (!SupportUtil.getInstance().getRoomHelpers().getMessageListDeep(item, false).isEmpty()) - return true; + return !item2pairs.get(element).isEmpty(); } return false; |