Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-06-18 09:33:51 -0400
committerHenrik Rentz-Reichert2012-06-18 09:33:51 -0400
commit9737bd4730691fd4e8450360ad3fd2b523c42cf1 (patch)
treec26011c281a852041d481ae312db23b0ca2d56ac /plugins/org.eclipse.etrice.ui.structure
parent09516238c6c926e8423172ce3bed77719128ba09 (diff)
downloadorg.eclipse.etrice-9737bd4730691fd4e8450360ad3fd2b523c42cf1.tar.gz
org.eclipse.etrice-9737bd4730691fd4e8450360ad3fd2b523c42cf1.tar.xz
org.eclipse.etrice-9737bd4730691fd4e8450360ad3fd2b523c42cf1.zip
[core.room, ui.structure] bug fix in binding validation
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure')
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SubProtocolSelectionDialog.java8
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java12
2 files changed, 11 insertions, 9 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SubProtocolSelectionDialog.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SubProtocolSelectionDialog.java
index 31567a72f..76b6b43d3 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SubProtocolSelectionDialog.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/SubProtocolSelectionDialog.java
@@ -14,6 +14,7 @@ package org.eclipse.etrice.ui.structure.dialogs;
import java.util.List;
+import org.eclipse.etrice.core.room.ActorContainerRef;
import org.eclipse.etrice.core.room.Binding;
import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.StructureClass;
@@ -113,16 +114,13 @@ public class SubProtocolSelectionDialog extends FormDialog {
private List<Match> matches;
private Match selected;
- /**
- * @param shell
- */
- public SubProtocolSelectionDialog(Shell shell, Port src, Port dst, Binding bind, StructureClass sc) {
+ public SubProtocolSelectionDialog(Shell shell, Port src, ActorContainerRef srcRef, Port dst, ActorContainerRef dstRef, Binding bind, StructureClass sc) {
super(shell);
this.src = src;
this.dst = dst;
- matches = CompoundProtocolHelpers.getMatches(src, dst, sc, bind);
+ matches = CompoundProtocolHelpers.getMatches(src, srcRef, dst, dstRef, sc, bind);
// find match to select
if (bind!=null) {
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
index 1b0ffb55b..9d00c9f81 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/BindingSupport.java
@@ -21,6 +21,7 @@ import org.eclipse.etrice.core.room.ActorContainerClass;
import org.eclipse.etrice.core.room.ActorContainerRef;
import org.eclipse.etrice.core.room.Binding;
import org.eclipse.etrice.core.room.BindingEndPoint;
+import org.eclipse.etrice.core.room.CompoundProtocolClass;
import org.eclipse.etrice.core.room.GeneralProtocolClass;
import org.eclipse.etrice.core.room.LogicalSystem;
import org.eclipse.etrice.core.room.Port;
@@ -172,9 +173,9 @@ public class BindingSupport {
GeneralProtocolClass srcGPC = src.getProtocol();
GeneralProtocolClass dstGPC = dst.getProtocol();
- if (srcGPC instanceof GeneralProtocolClass || dstGPC instanceof GeneralProtocolClass) {
+ if (srcGPC instanceof CompoundProtocolClass || dstGPC instanceof CompoundProtocolClass) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- SubProtocolSelectionDialog dlg = new SubProtocolSelectionDialog(shell, src, dst, null, sc);
+ SubProtocolSelectionDialog dlg = new SubProtocolSelectionDialog(shell, src, ar1, dst, ar2, null, sc);
if (dlg.open()!=Window.OK)
throw new OperationCanceledException();
@@ -325,7 +326,7 @@ public class BindingSupport {
GeneralProtocolClass dstGPC = dst.getProtocol();
if (srcGPC instanceof GeneralProtocolClass || dstGPC instanceof GeneralProtocolClass) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- SubProtocolSelectionDialog dlg = new SubProtocolSelectionDialog(shell, src, dst, bind, sc);
+ SubProtocolSelectionDialog dlg = new SubProtocolSelectionDialog(shell, src, ar1, dst, ar2, bind, sc);
if (dlg.open()!=Window.OK)
return;
@@ -452,7 +453,10 @@ public class BindingSupport {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
SubProtocolSelectionDialog dlg = new SubProtocolSelectionDialog(
- shell, bind.getEndpoint1().getPort(), bind.getEndpoint2().getPort(), bind, sc);
+ shell,
+ bind.getEndpoint1().getPort(), bind.getEndpoint1().getActorRef(),
+ bind.getEndpoint2().getPort(), bind.getEndpoint2().getActorRef(),
+ bind, sc);
if (dlg.open()!=Window.OK)
return;

Back to the top