Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-10-10 15:33:50 +0000
committerHenrik Rentz-Reichert2011-10-10 15:33:50 +0000
commitab9d7b2f8fc90f9b9bd0580ca334c9e1bb891413 (patch)
treee32dec91c94805fd5c687458667646540b165066 /plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui
parentefe449dc7f03a17da6365a1eec5add0461b95c00 (diff)
downloadorg.eclipse.etrice-ab9d7b2f8fc90f9b9bd0580ca334c9e1bb891413.tar.gz
org.eclipse.etrice-ab9d7b2f8fc90f9b9bd0580ca334c9e1bb891413.tar.xz
org.eclipse.etrice-ab9d7b2f8fc90f9b9bd0580ca334c9e1bb891413.zip
[ui.structure] 360399: disable flag relay port as standard for interface port
https://bugs.eclipse.org/bugs/show_bug.cgi?id=360399
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui')
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java
index 87f738bb6..fb3a52dcc 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/support/PortSupport.java
@@ -55,6 +55,7 @@ import org.eclipse.xtext.scoping.IScopeProvider;
import org.eclipse.etrice.core.naming.RoomNameProvider;
import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.ActorContainerClass;
+import org.eclipse.etrice.core.room.ExternalPort;
import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.RoomFactory;
@@ -86,13 +87,19 @@ public class PortSupport extends InterfaceItemSupport {
// create Port
Port port = RoomFactory.eINSTANCE.createPort();
port.setName(RoomNameProvider.getUniqueInterfaceItemName("p", acc));
-
+ ExternalPort xp = null;
+
if (acc instanceof ActorClass) {
ActorClass ac = (ActorClass) acc;
if (internal)
ac.getIntPorts().add(port);
- else
+ else {
ac.getIfPorts().add(port);
+
+ xp = RoomFactory.eINSTANCE.createExternalPort();
+ xp.setIfport(port);
+ ac.getExtPorts().add(xp);
+ }
}
else if (acc instanceof SubSystemClass) {
SubSystemClass ssc = (SubSystemClass) acc;
@@ -111,8 +118,10 @@ public class PortSupport extends InterfaceItemSupport {
ActorClass ac = (ActorClass) acc;
if (internal)
ac.getIntPorts().remove(port);
- else
+ else {
ac.getIfPorts().remove(port);
+ ac.getExtPorts().remove(xp);
+ }
}
else if (acc instanceof SubSystemClass) {
SubSystemClass ssc = (SubSystemClass) acc;

Back to the top