Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-03-16 15:15:27 -0400
committerHenrik Rentz-Reichert2012-03-16 15:15:27 -0400
commitcbf2dbe70c29900c3a3600bcc4e5547620c5b1a9 (patch)
treecad5f79832897a6ac389fb58134e60606417deac /plugins/org.eclipse.etrice.ui.structure
parentc3a374066a58357dcbfdbd6a242f57e5724a58b3 (diff)
downloadorg.eclipse.etrice-cbf2dbe70c29900c3a3600bcc4e5547620c5b1a9.tar.gz
org.eclipse.etrice-cbf2dbe70c29900c3a3600bcc4e5547620c5b1a9.tar.xz
org.eclipse.etrice-cbf2dbe70c29900c3a3600bcc4e5547620c5b1a9.zip
[ui.structure] check of multiplicity of data driven ports
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/PortPropertyDialog.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java
index a8c3b4551..52ff2d145 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/dialogs/PortPropertyDialog.java
@@ -41,6 +41,7 @@ import org.eclipse.xtext.scoping.IScope;
import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.ActorContainerClass;
+import org.eclipse.etrice.core.room.CommunicationType;
import org.eclipse.etrice.core.room.ExternalPort;
import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.ProtocolClass;
@@ -98,9 +99,14 @@ public class PortPropertyDialog extends AbstractPropertyDialog {
return ValidationStatus.error("multiplicity must be -1 or positive");
if (!mayChange) {
if (old==1 && (m>1 || m==-1))
- return ValidationStatus.error("cannot make connected port replicated");
+ return ValidationStatus.error("cannot change connected port to replicated");
if ((old>1 || old==-1) && m==1)
- return ValidationStatus.error("cannot make connected port not replicated");
+ return ValidationStatus.error("cannot change connected port to not replicated");
+ }
+
+ if (port.getProtocol()!=null && port.getProtocol().getCommType()==CommunicationType.DATA_DRIVEN) {
+ if (m!=1)
+ return ValidationStatus.error("data driven ports can not be replicated");
}
}
return Status.OK_STATUS;

Back to the top