diff options
| author | Céline Janssens | 2015-09-09 15:34:10 +0000 |
|---|---|---|
| committer | Gerrit Code Review @ Eclipse.org | 2015-09-10 15:32:47 +0000 |
| commit | 91f7cc0bbabd03717282b65699730a68d6e6f62e (patch) | |
| tree | 966f7c6ae6f0f6c715f7832405b9d52983725a8b | |
| parent | 87e9627139c55e755ccecced3e8a33424c6a60e5 (diff) | |
| download | org.eclipse.papyrus-rt-91f7cc0bbabd03717282b65699730a68d6e6f62e.tar.gz org.eclipse.papyrus-rt-91f7cc0bbabd03717282b65699730a68d6e6f62e.tar.xz org.eclipse.papyrus-rt-91f7cc0bbabd03717282b65699730a68d6e6f62e.zip | |
472884: [tooling] Service ports for capsuleParts shall be canonically
displayed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=472884
- Display all Ports of Capsule on CapsulePart typing this capsule
- When type of ports changed, the display is updated automatically
- To deactivate the canonical behavior the CSS boolean property is
"displayServicePort"
- Reactivate the Extended Multiplicity for CapsulePart (Custom)
- Avoid Constant, replaced by structural Feature
Change-Id: Ic8b51d2e64b7af67a54122c3166dcb5e28bf74c4
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=473064
Signed-off-by: Céline Janssens <Celine.Janssens@all4tec.net>
14 files changed, 744 insertions, 339 deletions
diff --git a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/IRealTimeConstants.java b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/IRealTimeConstants.java index 6367e4456..f6cbd5483 100644 --- a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/IRealTimeConstants.java +++ b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/IRealTimeConstants.java @@ -17,41 +17,15 @@ package org.eclipse.papyrusrt.umlrt.core.utils; */ public interface IRealTimeConstants { - - - - /** The Constant UML_RT_STEREOTYPE_QN. */ - public final static String UML_RT_STEREOTYPE_QN = "UMLRealTime::RTPort";// $NON-NLS-0$ - - /** The Constant SERVICE. */ - public final static String SERVICE = "isService";// $NON-NLS-0$ - - /** The Constant WIRED. */ - public final static String WIRED = "isWired";// $NON-NLS-0$ - - /** The Constant NOTIFICATION. */ - public final static String NOTIFICATION = "isNotification";// $NON-NLS-0$ - - /** The Constant PUBLISH. */ - public final static String PUBLISH = "isPublish";// $NON-NLS-0$ - - /** The Constant CONJUGATED. */ - public final static String CONJUGATED = "isConjugated";// $NON-NLS-0$ - - /** The Constant BEHAVIOR. */ - public final static String BEHAVIOR = "isBehavior";// $NON-NLS-0$ - - /** The Constant PROTOCOL_TYPE. */ + /** The name of the custom property to type a Port with a protocol . */ public static final String PROTOCOL_TYPE = "type";// $NON-NLS-0$ - /** The Constant KIND. */ + /** The name of the custom property KIND to define RTPort and CapsulePart kind. */ public final static String KIND = "kind";// $NON-NLS-0$ - /** The multiplicity property name */ + /** The name of the custom property multiplicity not directly related to the UML Multiplicity */ public final static String CAPSULE_PART_MULTIPLICITY = "RTmultiplicity"; // $NON-NLS-0$ - - } diff --git a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/RTPortUtils.java b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/RTPortUtils.java index c9a63c28c..092371a63 100644 --- a/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/RTPortUtils.java +++ b/plugins/umlrt/core/org.eclipse.papyrusrt.umlrt.core/src/org/eclipse/papyrusrt/umlrt/core/utils/RTPortUtils.java @@ -8,14 +8,16 @@ *
* Contributors:
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - add RTPORT_KIND_REQUEST_PARAMETER
+ * Celine Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 472884
*
*****************************************************************************/
package org.eclipse.papyrusrt.umlrt.core.utils;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTPort;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
/**
* Utility class on {@link Operation} that are RTMessage.
@@ -36,35 +38,34 @@ public class RTPortUtils { if (eObject instanceof Port) {
// get Owner of the operation, and check if this is a messageSET
Port port = (Port) eObject;
- if (null != getStereotype(port)) {
- return true;// UMLUtil.getStereotype(stereotypeApplication);
- }
+ return (null != getStereotypeApplication(port));
}
return false;
}
public boolean isConnected(Port port) {
- // TODO To Implements
+ // TODO To Implement
return true;
}
- public static Stereotype getStereotype(Port port) {
- return port.getAppliedStereotype(IRealTimeConstants.UML_RT_STEREOTYPE_QN);
+ public static RTPort getStereotypeApplication(Port port) {
+ return UMLUtil.getStereotypeApplication(port, RTPort.class);
+
}
public static boolean isWired(Port port) {
- return getStereotype(port) == null ? false : (Boolean) port.getValue(getStereotype(port), IRealTimeConstants.WIRED);
+ return getStereotypeApplication(port) == null ? false : (Boolean) getStereotypeApplication(port).isWired();
}
public static boolean isPublish(Port port) {
- return getStereotype(port) == null ? false : (Boolean) port.getValue(getStereotype(port), IRealTimeConstants.PUBLISH);
+ return getStereotypeApplication(port) == null ? false : (Boolean) getStereotypeApplication(port).isPublish();
}
public static boolean isNotification(Port port) {
- return getStereotype(port) == null ? false : (Boolean) port.getValue(getStereotype(port), IRealTimeConstants.NOTIFICATION);
+ return getStereotypeApplication(port) == null ? false : (Boolean) getStereotypeApplication(port).isNotification();
}
public static boolean isBehavior(Port port) {
@@ -88,7 +89,7 @@ public class RTPortUtils { */
public static RTPortKindEnum getKind(Port port) {
RTPortKindEnum kind = null;
- if (null != getStereotype(port)) {
+ if (isRTPort(port)) {
if (isService(port) && isWired(port) && isBehavior(port) && !isPublish(port)) {
kind = RTPortKindEnum.EXTERNAL;
} else if (isService(port) && isBehavior(port) && isPublish(port) && !isWired(port)) {
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/META-INF/MANIFEST.MF b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/META-INF/MANIFEST.MF index dad68cfaa..118c229e3 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/META-INF/MANIFEST.MF +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/META-INF/MANIFEST.MF @@ -46,6 +46,7 @@ Bundle-ActivationPolicy: lazy Export-Package: org.eclipse.papyrusrt.umlrt.tooling.diagram.common, org.eclipse.papyrusrt.umlrt.tooling.diagram.common.copy, org.eclipse.papyrusrt.umlrt.tooling.diagram.common.drop, + org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editpolicies, org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.sync, org.eclipse.papyrusrt.umlrt.tooling.diagram.common.internal.sync.statemachine, org.eclipse.papyrusrt.umlrt.tooling.diagram.common.locator, diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editparts/RTPropertyPartEditPart.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editparts/RTPropertyPartEditPart.java new file mode 100644 index 000000000..e45315336 --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editparts/RTPropertyPartEditPart.java @@ -0,0 +1,60 @@ +/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Celine Janssens (ALL4TEC) celine.janssens@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editparts;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartEditPartCN;
+import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editparts.providers.RTEditPartProvider;
+import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editpolicies.CanonicalPortDisplayEditPolicy;
+import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editpolicies.RTCustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editpolicies.RTSideAffixedNodesCreationEditPolicy;
+
+/**
+ * This Class redefines the PropertyPartEditPartCN for the Real Time Context
+ * This editPart is used to control the CapsulePart.
+ *
+ * @see {@link RTEditPartProvider}
+ *
+ * @author Céline JANSSENS
+ *
+ */
+public class RTPropertyPartEditPart extends PropertyPartEditPartCN {
+
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public RTPropertyPartEditPart(View view) {
+ super(view);
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartEditPartCN#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new RTSideAffixedNodesCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new RTCustomDiagramDragDropEditPolicy());
+ installEditPolicy(CanonicalPortDisplayEditPolicy.CANONICAL_PORT_DISPLAY_ROLE, new CanonicalPortDisplayEditPolicy());
+
+ }
+
+}
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editparts/providers/RTEditPartProvider.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editparts/providers/RTEditPartProvider.java index 95ad8b7a0..4008be1d4 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editparts/providers/RTEditPartProvider.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editparts/providers/RTEditPartProvider.java @@ -21,9 +21,13 @@ import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPar import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartEditPartCN;
+import org.eclipse.papyrusrt.umlrt.core.utils.CapsulePartUtils;
import org.eclipse.papyrusrt.umlrt.core.utils.CapsuleUtils;
import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editparts.RTClassCompositeEditPart;
+import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editparts.RTPropertyPartEditPart;
import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
/**
@@ -49,6 +53,8 @@ public class RTEditPartProvider extends AbstractEditPartProvider { // Nodes
nodeMap.put(Integer.toString(ClassCompositeEditPart.VISUAL_ID), RTClassCompositeEditPart.class);
+ nodeMap.put(Integer.toString(PropertyPartEditPartCN.VISUAL_ID), RTPropertyPartEditPart.class);
+
}
/**
@@ -65,6 +71,8 @@ public class RTEditPartProvider extends AbstractEditPartProvider { boolean provide = false;
String currentDiagramType;
EObject referenceElement = ((IEditPartOperation) operation).getView().getElement();
+
+ // Test Capsule in Composite Structure Diagram
if ((operation instanceof CreateGraphicEditPartOperation) && (referenceElement instanceof Classifier) && (CapsuleUtils.isCapsule((Classifier) referenceElement))) {
currentDiagramType = ((IEditPartOperation) operation).getView().getDiagram().getType();
@@ -78,6 +86,21 @@ public class RTEditPartProvider extends AbstractEditPartProvider { }
+ // Test Capsule Part in Composite Structure Diagram
+ if ((operation instanceof CreateGraphicEditPartOperation) && (referenceElement instanceof Property) && (CapsulePartUtils.isCapsulePart((Property) referenceElement))) {
+
+ currentDiagramType = ((IEditPartOperation) operation).getView().getDiagram().getType();
+
+ if ((diagramType == null) || (!diagramType.equals(currentDiagramType))) {
+ provide = false;
+ } else {
+ provide = super.provides(operation);
+ }
+
+
+ }
+
+
return provide;
}
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editpolicies/CanonicalPortDisplayEditPolicy.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editpolicies/CanonicalPortDisplayEditPolicy.java new file mode 100644 index 000000000..29ab8ad51 --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editpolicies/CanonicalPortDisplayEditPolicy.java @@ -0,0 +1,316 @@ +/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Celine Janssens (ALL4TEC) celine.janssens@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrusrt.umlrt.tooling.diagram.common.editpolicies;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.uml.diagram.common.util.CommandUtil;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
+import org.eclipse.papyrusrt.umlrt.core.utils.CapsulePartUtils;
+import org.eclipse.papyrusrt.umlrt.core.utils.CapsuleUtils;
+import org.eclipse.papyrusrt.umlrt.core.utils.RTPortUtils;
+import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.Capsule;
+import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.utils.NamedStyleProperties;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * This EditPolicy is used in the Real Time Context and allows to display Service Port canonically on CapsulePart.
+ * To activate or deactivate the canonical behavior, the CSS property can be defined: {@link NamedStyleProperties.DISPLAY_SERVICE_PORT}.
+ *
+ * @author Céline JANSSENS
+ *
+ */
+public class CanonicalPortDisplayEditPolicy extends GraphicalEditPolicyEx implements NotificationListener {
+
+ /**
+ * Role key of the Canonical Edit Policy
+ */
+ public static final String CANONICAL_PORT_DISPLAY_ROLE = "CanonicalPortDisplay";// $NON-NLS-0$
+
+
+ /**
+ * NamedStyle property to display all the service port of a Capsule
+ */
+ private static final String DISPLAY_SERVICE_PORT = NamedStyleProperties.DISPLAY_SERVICE_PORT;
+
+ /**
+ * The view of the host EditPart.
+ */
+ private View hostView;
+ /**
+ * The Capsule as uml Class
+ */
+ private org.eclipse.uml2.uml.Class capsule;
+
+ /**
+ * The CapsulePart as uml Property
+ */
+ private Property capsulePart;
+
+ /**
+ * The CSS Value of {@link DISPLAY_SERVICE_PORT}
+ */
+ private boolean displayServicePort;
+
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#activate()
+ *
+ */
+ @Override
+ public void activate() {
+ initialisation();
+ getDiagramEventBroker().addNotificationListener(capsule, this);
+ super.activate();
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.AbstractEditPolicy#deactivate()
+ *
+ */
+ @Override
+ public void deactivate() {
+ getDiagramEventBroker().removeNotificationListener(capsule, this);
+ super.deactivate();
+ }
+
+ /**
+ * Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ DiagramEventBroker eventBorker = null;
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (null != theEditingDomain) {
+ eventBorker = DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return eventBorker;
+ }
+
+
+ /**
+ * Initialization of Members
+ */
+ protected void initialisation() {
+ if (getHost() instanceof GraphicalEditPart) {
+ hostView = ((GraphicalEditPart) getHost()).getNotationView();
+ displayServicePort = NotationUtils.getBooleanValue(hostView, DISPLAY_SERVICE_PORT, true);
+
+ if (hostView.getElement() instanceof Property) {
+ capsulePart = (Property) hostView.getElement();
+ }
+
+ if (CapsulePartUtils.isCapsulePart(capsulePart)) {
+ Object type = capsulePart.getType();
+
+ if ((type instanceof Class) && (null != UMLUtil.getStereotypeApplication((Class) type, Capsule.class))) {
+ capsule = (Class) type;
+ }
+
+ }
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx#refresh()
+ * Create the Port to be created and delete the Orphan port
+ */
+ @Override
+ public void refresh() {
+ createPortView();
+ deletePortView();
+ super.refresh();
+ }
+
+ /**
+ * Delete all the view that should not be there
+ */
+ private void deletePortView() {
+ for (Object child : hostView.getChildren()) {
+ if ((child instanceof Node)) {
+ Object childElement = ((Node) child).getElement();
+ // if the port element doesn't exist in the capsule, delete the view in the CapsulePart
+ if ((childElement instanceof Port) && (!capsule.getOwnedPorts().contains(childElement))) {
+ deletePortView((Port) childElement);
+ } else if (!displayServicePort) {
+ deletePortView((Port) childElement);
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Creates the port view.
+ */
+ private void createPortView() {
+ initialisation();
+
+ if ((displayServicePort) && (null != capsule)) {
+ for (Port port : capsule.getOwnedPorts()) {
+ // Add listener on the UML Element
+ getDiagramEventBroker().addNotificationListener(port, this);
+ if (RTPortUtils.isService(port)) {// only service port should be displayed
+ if (null == getPortView(port)) {// if the view of the port doesn't exist in the Capsule Part create it
+ displayPortView(port);
+ }
+ }
+ }
+
+ }
+ }
+
+ /**
+ * Retrieve the View associated to the port for the Host
+ *
+ * @param port
+ * the UML element of the view we are looking for
+ * @return The view of the port into the host view children
+ */
+ private View getPortView(Port port) {
+ View portView = null;
+ Iterator<?> iterator = hostView.getChildren().iterator();
+ while (null == portView && iterator.hasNext()) {
+ Object child = iterator.next();
+ if ((child instanceof Node) && ((Node) child).getElement().equals(port)) {
+ portView = (Node) child;
+ }
+ }
+ return portView;
+ }
+
+
+ /**
+ * Create the view of the port
+ *
+ * @param port
+ */
+ protected void displayPortView(Port port) {
+ CreateViewRequest request = getCreationViewRequest(port);
+ Command command = getHost().getCommand(request);
+
+ CommandUtil.executeCommand(command, ((IGraphicalEditPart) getHost()));
+ }
+
+ /**
+ * Get the Creation View request for the Port
+ *
+ * @param port
+ * @return
+ */
+ protected CreateViewRequest getCreationViewRequest(Port port) {
+
+ String semanticHint = ((IHintedType) UMLElementTypes.Port_3069).getSemanticHint();
+ IAdaptable elementAdapter = new EObjectAdapter(port);
+ ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, semanticHint, ViewUtil.APPEND, false, getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+
+ return createViewRequest;
+ }
+
+ /**
+ * Gets the diagram preferences hint.
+ *
+ * @return the diagram preferences hint
+ */
+ protected PreferencesHint getDiagramPreferencesHint() {
+ return ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint();
+ }
+
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ int type = notification.getEventType();
+ Object notifier = notification.getNotifier();
+ Object newValue = notification.getNewValue();
+ Object oldValue = notification.getOldValue();
+
+ // If a new port is created in the Capsule then create the new view accordingly into the CapsulePart
+ if ((type == Notification.ADD) || (newValue instanceof Port)) {
+ if ((notifier instanceof Class) && (CapsuleUtils.isCapsule((Class) notifier))) {
+ createPortView();
+ }
+ }
+
+ // If a port is deleted in the Capsule then delete the view accordingly into the CapsulePart
+ if ((type == Notification.REMOVE) || (oldValue instanceof Port)) {
+ if ((notifier instanceof Class) && (CapsuleUtils.isCapsule((Class) notifier))) {
+ deletePortView((Port) oldValue);
+ }
+ }
+
+ // If a port is deleted in the Capsule then delete the view accordingly into the CapsulePart
+ if ((type == Notification.SET) || (notifier instanceof Port)) {
+ Object feature = notification.getFeature();
+
+ if ((null != feature) && (UMLPackage.PORT__IS_SERVICE == ((EStructuralFeature) feature).getFeatureID())) {
+ if ((newValue instanceof Boolean) && ((Boolean) newValue)) {
+ createPortView();
+ } else {
+ deletePortView((Port) notifier);
+ }
+ }
+
+
+ }
+
+
+ }
+
+ /**
+ * Delete the view of the Port in the CapsulePart visualization
+ *
+ * @param port
+ * The Port Element corresponding to the view to delete
+ */
+ private void deletePortView(Port port) {
+ View viewPort = getPortView(port);
+ if (null != viewPort) {
+ DeleteCommand command = new DeleteCommand(viewPort);
+ CommandUtil.executeUnsafeCommand(command, getHost());
+ }
+ }
+
+}
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editpolicies/RTCustomDiagramDragDropEditPolicy.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editpolicies/RTCustomDiagramDragDropEditPolicy.java index 9ef62c00c..b15804a47 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editpolicies/RTCustomDiagramDragDropEditPolicy.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/editpolicies/RTCustomDiagramDragDropEditPolicy.java @@ -27,13 +27,16 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest; import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrusrt.umlrt.core.Activator;
+import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.CapsulePart;
import org.eclipse.papyrusrt.umlrt.tooling.diagram.common.locator.RTPortPositionLocator;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.ConnectableElement;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.EncapsulatedClassifier;
import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
/**
@@ -119,6 +122,12 @@ public class RTCustomDiagramDragDropEditPolicy extends CustomDiagramDragDropEdit return getDropAffixedNodeInCompartmentCommand(nodeVISUALID, dropLocation, droppedElement);
}
return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, dropLocation, droppedElement));
+ } else if ((graphicalParentObject instanceof Property) && (null != UMLUtil.getStereotypeApplication((Property) graphicalParentObject, CapsulePart.class))) {
+ // Drop Port on StructuredClassifier
+ if (isCompartmentTarget) {
+ return getDropAffixedNodeInCompartmentCommand(nodeVISUALID, dropLocation, droppedElement);
+ }
+ return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, dropLocation, droppedElement));
} else if (graphicalParentObject instanceof ConnectableElement) {
// Drop Port on Part
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/locator/RTPortPositionLocator.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/locator/RTPortPositionLocator.java index bbc5e26cd..095664ec6 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/locator/RTPortPositionLocator.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/locator/RTPortPositionLocator.java @@ -17,8 +17,6 @@ import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.papyrus.uml.diagram.common.figure.node.SubCompartmentLayoutManager;
import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.locators.ExternalPortPositionLocator;
-import org.eclipse.papyrus.uml.diagram.composite.custom.locators.InternalPortPositionLocator;
import org.eclipse.papyrusrt.umlrt.core.utils.RTPortKindEnum;
import org.eclipse.papyrusrt.umlrt.core.utils.RTPortUtils;
import org.eclipse.uml2.uml.Element;
@@ -30,18 +28,10 @@ import org.eclipse.uml2.uml.Port; */
public class RTPortPositionLocator extends PortPositionLocator {
- /** The view. */
- private Object view;
/** The port. */
private Element port;
- /** the figure. */
- private IFigure figure;
-
- private InternalPortPositionLocator internalLocator;
- private ExternalPortPositionLocator externalLocator;
-
/**
* Instantiates a new RT port position locator.
*
@@ -54,11 +44,21 @@ public class RTPortPositionLocator extends PortPositionLocator { */
public RTPortPositionLocator(Element droppedElement, IFigure parentFigure, int preferredSide) {
super(parentFigure, preferredSide);
- this.view = droppedElement.getModel();
+
this.port = droppedElement;
}
/**
+ * Constructor.
+ *
+ * @param hostFigure
+ * @param none
+ */
+ public RTPortPositionLocator(IFigure hostFigure, int side) {
+ super(hostFigure, side);
+ }
+
+ /**
* Calculates the preferred location according to the RTPort type.
* Only Internal and SAP Kind can be located internally.
*
@@ -90,6 +90,8 @@ public class RTPortPositionLocator extends PortPositionLocator { } else {
newLocation = getPreferredBorderedLocation(proposedLocation);
}
+ } else {
+ newLocation = getPreferredBorderedLocation(proposedLocation);
}
return newLocation;
}
@@ -146,28 +148,8 @@ public class RTPortPositionLocator extends PortPositionLocator { return realLocation;
- // Rectangle parentBounds = parentFigure.getBounds().getCopy();
- // IFigure compartment = getCompositeCompartmentFigure(parentFigure);
- //
- // Rectangle prefferedLocation;
- // if (null != compartment) {
- // Rectangle compartmentBounds = compartment.getBounds().getCopy();
- // compartmentBounds = compartmentBounds.getTranslated(compartment.getBounds().getLocation().getCopy().getNegated());
- // Rectangle reduceCompartment = compartmentBounds.expand(-10, -10);
- // if (reduceCompartment.contains(proposedLocation)) {
- // prefferedLocation = proposedLocation.getCopy();
- // } else {
- // prefferedLocation = parentBounds.translate(30, 60).getCopy();
- // prefferedLocation.setSize(proposedLocation.width, proposedLocation.height);
- //
- // }
- //
- // } else {
- // // Should not happened
- // prefferedLocation = new Rectangle();
- // }
- //
- // return prefferedLocation;
+
+
}
/**
@@ -179,7 +161,7 @@ public class RTPortPositionLocator extends PortPositionLocator { */
private IFigure getCompositeCompartmentFigure(IFigure parentFigure) {
IFigure composite = null;
- Iterator childrenIterator = parentFigure.getChildren().iterator();
+ Iterator<?> childrenIterator = parentFigure.getChildren().iterator();
while (null == composite && childrenIterator.hasNext()) {
Object child = childrenIterator.next();
if (child instanceof IFigure) {
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/utils/NamedStyleProperties.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/utils/NamedStyleProperties.java new file mode 100644 index 000000000..d0909b0a0 --- /dev/null +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/src/org/eclipse/papyrusrt/umlrt/tooling/diagram/common/utils/NamedStyleProperties.java @@ -0,0 +1,30 @@ +/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Celine Janssens (ALL4TEC) celine.janssens@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrusrt.umlrt.tooling.diagram.common.utils;
+
+/**
+ * This Interface provides all the NamedStyle Properties for Real Time context
+ *
+ * @author Céline JANSSENS
+ *
+ */
+public interface NamedStyleProperties {
+
+ /**
+ * NamedStyle property to display all the service port of a Capsule
+ */
+ public static final String DISPLAY_SERVICE_PORT = "displayServicePort";// $NON-NLS-0$
+
+
+}
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/ui/SingleCapsulePart.xwt b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/ui/SingleCapsulePart.xwt index 506755b13..f590d0b11 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/ui/SingleCapsulePart.xwt +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/ui/SingleCapsulePart.xwt @@ -1,28 +1,29 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Composite xmlns="http://www.eclipse.org/xwt/presentation" - xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout" - xmlns:x="http://www.eclipse.org/xwt" xmlns:ppumlrt="clr-namespace:org.eclipse.papyrusrt.umlrt.tooling.ui.widgets" - xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets" - xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"> - <Composite.layout> - <ppel:PropertiesLayout></ppel:PropertiesLayout> - </Composite.layout> - <Composite> - <Composite.layout> - <ppel:PropertiesLayout></ppel:PropertiesLayout> - </Composite.layout> - <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor> - <ppumlrt:CapsulePartTypeEditor property="UMLRealTimeExt:Property:type" - input="{Binding}" customLabel="Capsule"></ppumlrt:CapsulePartTypeEditor> - </Composite> - <Group text="Capsule Part Properties"> - <Group.layout> - <ppel:PropertiesLayout></ppel:PropertiesLayout> - </Group.layout> - <ppe:EnumRadio input="{Binding}" property="UMLRealTime:CapsulePart:kind"></ppe:EnumRadio> - <uml:MultiplicityDialog input="{Binding}" - property="Multiplicity:multiplicity" customLabel="Multiplicity"></uml:MultiplicityDialog> - <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation" - readOnly="true"></ppe:EnumCombo> - </Group> +<?xml version="1.0" encoding="UTF-8"?>
+<Composite
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppumlrt="clr-namespace:org.eclipse.papyrusrt.umlrt.tooling.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ <ppumlrt:CapsulePartTypeEditor property="UMLRealTimeExt:Property:type"
+ customLabel="Capsule" input="{Binding}"></ppumlrt:CapsulePartTypeEditor>
+ </Composite>
+ <Group text="Capsule Part Properties">
+ <Group.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Group.layout>
+ <ppe:EnumRadio input="{Binding}" property="UMLRealTime:CapsulePart:kind"></ppe:EnumRadio>
+ <uml:MultiplicityDialog input="{Binding}"
+ property="UMLRealTimeExt:RTMultiplicity:RTmultiplicity" customLabel="Multiplicity"></uml:MultiplicityDialog>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"
+ readOnly="true"></ppe:EnumCombo>
+ </Group>
</Composite>
\ No newline at end of file diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/uml-rt.ctx b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/uml-rt.ctx index e1d9a65c7..625e0c0a9 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/uml-rt.ctx +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.properties/propertyView/UML-RT/uml-rt.ctx @@ -1,218 +1,223 @@ -<?xml version="1.0" encoding="ASCII"?> -<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" xmi:id="_WdNAMPMfEeSMV8TyMaa7Sg" name="UMLRealTime"> - <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_69QJkKDJEeSZxfCXzZz3-w"/> - <tabs xmi:id="_WdNAMfMfEeSMV8TyMaa7Sg" label="Real Time" id="umlrealtime" priority="5"> - <sections xmi:id="_WdNAMvMfEeSMV8TyMaa7Sg" name="Single RTConnector" sectionFile="ui/SingleRTConnector.xwt"> - <widget href="ui/SingleRTConnector.xwt#/"/> - </sections> - <sections xmi:id="_WdNAM_MfEeSMV8TyMaa7Sg" name="Multiple RTConnector" sectionFile="ui/MultipleRTConnector.xwt"> - <widget href="ui/MultipleRTConnector.xwt#/"/> - </sections> - <sections xmi:id="_WdNANPMfEeSMV8TyMaa7Sg" name="Single RTPort" sectionFile="ui/SingleRTPort.xwt"> - <widget href="ui/SingleRTPort.xwt#/"/> - </sections> - <sections xmi:id="_WdNANfMfEeSMV8TyMaa7Sg" name="Multiple RTPort" sectionFile="ui/MultipleRTPort.xwt"> - <widget href="ui/MultipleRTPort.xwt#/"/> - </sections> - <sections xmi:id="_WdNANvMfEeSMV8TyMaa7Sg" name="Single Capsule" sectionFile="ui/SingleCapsule.xwt"> - <widget href="ui/SingleCapsule.xwt#/"/> - </sections> - <sections xmi:id="_WdNAN_MfEeSMV8TyMaa7Sg" name="Multiple Capsule" sectionFile="ui/MultipleCapsule.xwt"> - <widget href="ui/MultipleCapsule.xwt#/"/> - </sections> - <sections xmi:id="_WdNAOPMfEeSMV8TyMaa7Sg" name="Single Protocol" sectionFile="ui/SingleProtocol.xwt"> - <widget href="ui/SingleProtocol.xwt#/"/> - </sections> - <sections xmi:id="_WdNAOfMfEeSMV8TyMaa7Sg" name="Multiple Protocol" sectionFile="ui/MultipleProtocol.xwt"> - <widget href="ui/MultipleProtocol.xwt#/"/> - </sections> - <sections xmi:id="_WdNAOvMfEeSMV8TyMaa7Sg" name="Single RTMessageSet" sectionFile="ui/SingleRTMessageSet.xwt"> - <widget href="ui/SingleRTMessageSet.xwt#/"/> - </sections> - <sections xmi:id="_WdNAO_MfEeSMV8TyMaa7Sg" name="Multiple RTMessageSet" sectionFile="ui/MultipleRTMessageSet.xwt"> - <widget href="ui/MultipleRTMessageSet.xwt#/"/> - </sections> - <sections xmi:id="_WdNAPPMfEeSMV8TyMaa7Sg" name="Single ProtocolContainer" sectionFile="ui/SingleProtocolContainer.xwt"> - <widget href="ui/SingleProtocolContainer.xwt#/"/> - </sections> - <sections xmi:id="_WdNAPfMfEeSMV8TyMaa7Sg" name="Multiple ProtocolContainer" sectionFile="ui/MultipleProtocolContainer.xwt"> - <widget href="ui/MultipleProtocolContainer.xwt#/"/> - </sections> - <sections xmi:id="_WdNAPvMfEeSMV8TyMaa7Sg" name="Single CapsulePart" sectionFile="ui/SingleCapsulePart.xwt"> - <widget href="ui/SingleCapsulePart.xwt#/"/> - </sections> - <sections xmi:id="_WdNAP_MfEeSMV8TyMaa7Sg" name="Multiple CapsulePart" sectionFile="ui/MultipleCapsulePart.xwt"> - <widget href="ui/MultipleCapsulePart.xwt#/"/> - </sections> - <sections xmi:id="_WdNAQPMfEeSMV8TyMaa7Sg" name="Single RTRExcludedElement" sectionFile="ui/SingleRTRExcludedElement.xwt"> - <widget href="ui/SingleRTRExcludedElement.xwt#/"/> - </sections> - <sections xmi:id="_WdNAQfMfEeSMV8TyMaa7Sg" name="Multiple RTRExcludedElement" sectionFile="ui/MultipleRTRExcludedElement.xwt"> - <widget href="ui/MultipleRTRExcludedElement.xwt#/"/> - </sections> - <sections xmi:id="_SectID_SingleRTTrigger" name="Single RTTtrigger" sectionFile="ui/SingleRTTrigger.xwt"> - <widget href="ui/SingleRTTrigger.xwt#/"/> - </sections> - <sections xmi:id="_SectID_MultRTTrigger" name="Multiple RTTtrigger" sectionFile="ui/MultipleRTTrigger.xwt"> - <widget href="ui/MultipleRTTrigger.xwt#/"/> - </sections> - </tabs> - <views xmi:id="_WdNAQvMfEeSMV8TyMaa7Sg" name="Single RTConnector" sections="_WdNAMvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnafMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNAQ_MfEeSMV8TyMaa7Sg" name="isSingleRTConnector"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNARPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTConnector"/> - </constraints> - </views> - <views xmi:id="_WdNARfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTConnector" sections="_WdNAM_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnafMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNARvMfEeSMV8TyMaa7Sg" name="isMultipleRTConnector"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNAR_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTConnector"/> - </constraints> - </views> - <views xmi:id="_WdNASPMfEeSMV8TyMaa7Sg" name="Single RTPort" sections="_WdNANPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnY_MfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNASfMfEeSMV8TyMaa7Sg" name="isSingleRTPort"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNASvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTPort"/> - </constraints> - </views> - <views xmi:id="_WdNnVvMfEeSMV8TyMaa7Sg" name="Single CapsulePart" sections="_WdNAPvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnavMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnV_MfEeSMV8TyMaa7Sg" name="isSingleCapsulePart"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnWPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::CapsulePart"/> - </constraints> - </views> - <views xmi:id="_WdNAS_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTPort" sections="_WdNANfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnY_MfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNATPMfEeSMV8TyMaa7Sg" name="isMultipleRTPort"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNATfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTPort"/> - </constraints> - </views> - <views xmi:id="_WdNATvMfEeSMV8TyMaa7Sg" name="Single Capsule" sections="_WdNANvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbfMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNAT_MfEeSMV8TyMaa7Sg" name="isSingleCapsule"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnQPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Capsule"/> - </constraints> - </views> - <views xmi:id="_WdNnQfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple Capsule" sections="_WdNAN_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbfMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnQvMfEeSMV8TyMaa7Sg" name="isMultipleCapsule"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnQ_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Capsule"/> - </constraints> - </views> - <views xmi:id="_WdNnRPMfEeSMV8TyMaa7Sg" name="Single Protocol" sections="_WdNAOPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNncfMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnRfMfEeSMV8TyMaa7Sg" name="isSingleProtocol"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnRvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Protocol"/> - </constraints> - </views> - <views xmi:id="_WdNnR_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple Protocol" sections="_WdNAOfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNncfMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnSPMfEeSMV8TyMaa7Sg" name="isMultipleProtocol"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnSfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Protocol"/> - </constraints> - </views> - <views xmi:id="_WdNnSvMfEeSMV8TyMaa7Sg" name="Single RTMessageSet" sections="_WdNAOvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbvMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnS_MfEeSMV8TyMaa7Sg" name="isSingleRTMessageSet"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnTPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTMessageSet"/> - </constraints> - </views> - <views xmi:id="_WdNnTfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTMessageSet" sections="_WdNAO_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbvMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnTvMfEeSMV8TyMaa7Sg" name="isMultipleRTMessageSet"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnT_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTMessageSet"/> - </constraints> - </views> - <views xmi:id="_WdNnUPMfEeSMV8TyMaa7Sg" name="Single ProtocolContainer" sections="_WdNAPPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNna_MfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnUfMfEeSMV8TyMaa7Sg" name="isSingleProtocolContainer"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnUvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::ProtocolContainer"/> - </constraints> - </views> - <views xmi:id="_WdNnU_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple ProtocolContainer" sections="_WdNAPfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNna_MfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnVPMfEeSMV8TyMaa7Sg" name="isMultipleProtocolContainer"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnVfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::ProtocolContainer"/> - </constraints> - </views> - <views xmi:id="_WdNnWfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple CapsulePart" sections="_WdNAP_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnavMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnWvMfEeSMV8TyMaa7Sg" name="isMultipleCapsulePart"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnW_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::CapsulePart"/> - </constraints> - </views> - <views xmi:id="_WdNnXPMfEeSMV8TyMaa7Sg" name="Single RTRExcludedElement" sections="_WdNAQPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbPMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnXfMfEeSMV8TyMaa7Sg" name="isSingleRTRExcludedElement"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnXvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTRExcludedElement"/> - </constraints> - </views> - <views xmi:id="_WdNnX_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTRExcludedElement" sections="_WdNAQfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbPMfEeSMV8TyMaa7Sg"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnYPMfEeSMV8TyMaa7Sg" name="isMultipleRTRExcludedElement"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnYfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTRExcludedElement"/> - </constraints> - </views> - <views xmi:id="_ViewID_SingleRTTrigger" name="Single RTTrigger" sections="_SectID_SingleRTTrigger" automaticContext="true" datacontexts="_DC_ID_Trigger"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_ConID_SingleTrigger" name="isSingleRTTrigger"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_ValID_SingleTrigger" name="umlClassName" value="Trigger"/> - </constraints> - </views> - <views xmi:id="_ViewID_MultRTTrigger" elementMultiplicity="-1" name="Multiple RTTrigger" sections="_SectID_MultRTTrigger" automaticContext="true" datacontexts="_DC_ID_Trigger"> - <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_ConID_MultTrigger" name="isMultipleRTTrigger"> - <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/> - <properties xsi:type="constraints:ValueProperty" xmi:id="_ValID_MultTrigger" name="umlClassName" value="Trigger"/> - </constraints> - </views> - <dataContexts xmi:id="_WdNnYvMfEeSMV8TyMaa7Sg" name="UMLRealTime"> - <elements xmi:id="_WdNnY_MfEeSMV8TyMaa7Sg" name="RTPort"> - <properties xmi:id="_WdNnZPMfEeSMV8TyMaa7Sg" name="isNotification" type="Boolean"/> - <properties xmi:id="_WdNnZfMfEeSMV8TyMaa7Sg" name="isPublish" type="Boolean"/> - <properties xmi:id="_WdNnZvMfEeSMV8TyMaa7Sg" name="isWired" type="Boolean"/> - <properties xmi:id="_WdNnZ_MfEeSMV8TyMaa7Sg" name="registration" type="Enumeration" description=""/> - <properties xmi:id="_WdNnaPMfEeSMV8TyMaa7Sg" name="registrationOverride" description=""/> - <properties xmi:id="_QhkXQC6_EeWWx70qeJ-t-Q" name="kind" label="" type="Enumeration" description=""/> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690ylaDJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="_WdNnafMfEeSMV8TyMaa7Sg" name="RTConnector"> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yvqDJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="_WdNnavMfEeSMV8TyMaa7Sg" name="CapsulePart"> - <properties xmi:id="_8KJ-8ETHEeWh8r-Cla6cZg" name="kind" label="" type="Enumeration"/> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yG6DJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="_WdNna_MfEeSMV8TyMaa7Sg" name="ProtocolContainer"> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690xiaDJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="_WdNnbPMfEeSMV8TyMaa7Sg" name="RTRExcludedElement"> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.17"/> - </elements> - <elements xmi:id="_WdNnbfMfEeSMV8TyMaa7Sg" name="Capsule"> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yXqDJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="_WdNnbvMfEeSMV8TyMaa7Sg" name="RTMessageSet"> - <properties xmi:id="_WdNnb_MfEeSMV8TyMaa7Sg" name="rtMsgKind" type="Enumeration"/> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.48"/> - </elements> - <modelElementFactory href="ppe:/environment/org.eclipse.papyrusrt.umlrt.tooling.ui/environment/Environment.xmi#//@modelElementFactories.1"/> - </dataContexts> - <dataContexts xmi:id="_WdNncPMfEeSMV8TyMaa7Sg" name="UMLRealTimeExt"> - <elements xmi:id="_WdNncfMfEeSMV8TyMaa7Sg" name="Protocol"> - <properties xmi:id="_WdNncvMfEeSMV8TyMaa7Sg" name="provides" type="Reference"/> - <properties xmi:id="_WdNnc_MfEeSMV8TyMaa7Sg" name="required" type="Reference"/> - <properties xmi:id="_WdNndPMfEeSMV8TyMaa7Sg" name="provreq" type="Reference"/> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690y4KDJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="_SIdvoDIMEeWNUrU2mjUBfw" name="Port"> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690ylaDJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="UMLRealTimeExtCapsulePartElement" name="Property"> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yG6DJEeSZxfCXzZz3-w"/> - </elements> - <elements xmi:id="_DC_ID_Trigger" name="RTTrigger"> - <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690ykaDJEeSZxfCXzZz3-w"/> - </elements> - <modelElementFactory href="ppe:/environment/org.eclipse.papyrusrt.umlrt.tooling.ui/environment/Environment.xmi#//@modelElementFactories.0"/> - </dataContexts> -</contexts:Context> +<?xml version="1.0" encoding="ASCII"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" xmi:id="_WdNAMPMfEeSMV8TyMaa7Sg" name="UMLRealTime">
+ <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_69QJkKDJEeSZxfCXzZz3-w"/>
+ <tabs xmi:id="_WdNAMfMfEeSMV8TyMaa7Sg" label="Real Time" id="umlrealtime" priority="5">
+ <sections xmi:id="_WdNAMvMfEeSMV8TyMaa7Sg" name="Single RTConnector" sectionFile="ui/SingleRTConnector.xwt">
+ <widget href="ui/SingleRTConnector.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAM_MfEeSMV8TyMaa7Sg" name="Multiple RTConnector" sectionFile="ui/MultipleRTConnector.xwt">
+ <widget href="ui/MultipleRTConnector.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNANPMfEeSMV8TyMaa7Sg" name="Single RTPort" sectionFile="ui/SingleRTPort.xwt">
+ <widget href="ui/SingleRTPort.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNANfMfEeSMV8TyMaa7Sg" name="Multiple RTPort" sectionFile="ui/MultipleRTPort.xwt">
+ <widget href="ui/MultipleRTPort.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNANvMfEeSMV8TyMaa7Sg" name="Single Capsule" sectionFile="ui/SingleCapsule.xwt">
+ <widget href="ui/SingleCapsule.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAN_MfEeSMV8TyMaa7Sg" name="Multiple Capsule" sectionFile="ui/MultipleCapsule.xwt">
+ <widget href="ui/MultipleCapsule.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAOPMfEeSMV8TyMaa7Sg" name="Single Protocol" sectionFile="ui/SingleProtocol.xwt">
+ <widget href="ui/SingleProtocol.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAOfMfEeSMV8TyMaa7Sg" name="Multiple Protocol" sectionFile="ui/MultipleProtocol.xwt">
+ <widget href="ui/MultipleProtocol.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAOvMfEeSMV8TyMaa7Sg" name="Single RTMessageSet" sectionFile="ui/SingleRTMessageSet.xwt">
+ <widget href="ui/SingleRTMessageSet.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAO_MfEeSMV8TyMaa7Sg" name="Multiple RTMessageSet" sectionFile="ui/MultipleRTMessageSet.xwt">
+ <widget href="ui/MultipleRTMessageSet.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAPPMfEeSMV8TyMaa7Sg" name="Single ProtocolContainer" sectionFile="ui/SingleProtocolContainer.xwt">
+ <widget href="ui/SingleProtocolContainer.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAPfMfEeSMV8TyMaa7Sg" name="Multiple ProtocolContainer" sectionFile="ui/MultipleProtocolContainer.xwt">
+ <widget href="ui/MultipleProtocolContainer.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAPvMfEeSMV8TyMaa7Sg" name="Single CapsulePart" sectionFile="ui/SingleCapsulePart.xwt">
+ <widget href="ui/SingleCapsulePart.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAP_MfEeSMV8TyMaa7Sg" name="Multiple CapsulePart" sectionFile="ui/MultipleCapsulePart.xwt">
+ <widget href="ui/MultipleCapsulePart.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAQPMfEeSMV8TyMaa7Sg" name="Single RTRExcludedElement" sectionFile="ui/SingleRTRExcludedElement.xwt">
+ <widget href="ui/SingleRTRExcludedElement.xwt#/"/>
+ </sections>
+ <sections xmi:id="_WdNAQfMfEeSMV8TyMaa7Sg" name="Multiple RTRExcludedElement" sectionFile="ui/MultipleRTRExcludedElement.xwt">
+ <widget href="ui/MultipleRTRExcludedElement.xwt#/"/>
+ </sections>
+ <sections xmi:id="_SectID_SingleRTTrigger" name="Single RTTtrigger" sectionFile="ui/SingleRTTrigger.xwt">
+ <widget href="ui/SingleRTTrigger.xwt#/"/>
+ </sections>
+ <sections xmi:id="_SectID_MultRTTrigger" name="Multiple RTTtrigger" sectionFile="ui/MultipleRTTrigger.xwt">
+ <widget href="ui/MultipleRTTrigger.xwt#/"/>
+ </sections>
+ </tabs>
+ <views xmi:id="_WdNAQvMfEeSMV8TyMaa7Sg" name="Single RTConnector" sections="_WdNAMvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnafMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNAQ_MfEeSMV8TyMaa7Sg" name="isSingleRTConnector">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNARPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTConnector"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNARfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTConnector" sections="_WdNAM_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnafMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNARvMfEeSMV8TyMaa7Sg" name="isMultipleRTConnector">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNAR_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTConnector"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNASPMfEeSMV8TyMaa7Sg" name="Single RTPort" sections="_WdNANPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnY_MfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNASfMfEeSMV8TyMaa7Sg" name="isSingleRTPort">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNASvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTPort"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnVvMfEeSMV8TyMaa7Sg" name="Single CapsulePart" sections="_WdNAPvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnavMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnV_MfEeSMV8TyMaa7Sg" name="isSingleCapsulePart">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnWPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::CapsulePart"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNAS_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTPort" sections="_WdNANfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnY_MfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNATPMfEeSMV8TyMaa7Sg" name="isMultipleRTPort">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNATfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTPort"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNATvMfEeSMV8TyMaa7Sg" name="Single Capsule" sections="_WdNANvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbfMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNAT_MfEeSMV8TyMaa7Sg" name="isSingleCapsule">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnQPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Capsule"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnQfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple Capsule" sections="_WdNAN_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbfMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnQvMfEeSMV8TyMaa7Sg" name="isMultipleCapsule">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnQ_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Capsule"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnRPMfEeSMV8TyMaa7Sg" name="Single Protocol" sections="_WdNAOPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNncfMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnRfMfEeSMV8TyMaa7Sg" name="isSingleProtocol">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnRvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Protocol"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnR_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple Protocol" sections="_WdNAOfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNncfMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnSPMfEeSMV8TyMaa7Sg" name="isMultipleProtocol">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnSfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::Protocol"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnSvMfEeSMV8TyMaa7Sg" name="Single RTMessageSet" sections="_WdNAOvMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbvMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnS_MfEeSMV8TyMaa7Sg" name="isSingleRTMessageSet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnTPMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTMessageSet"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnTfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTMessageSet" sections="_WdNAO_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbvMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnTvMfEeSMV8TyMaa7Sg" name="isMultipleRTMessageSet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnT_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTMessageSet"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnUPMfEeSMV8TyMaa7Sg" name="Single ProtocolContainer" sections="_WdNAPPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNna_MfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnUfMfEeSMV8TyMaa7Sg" name="isSingleProtocolContainer">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnUvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::ProtocolContainer"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnU_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple ProtocolContainer" sections="_WdNAPfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNna_MfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnVPMfEeSMV8TyMaa7Sg" name="isMultipleProtocolContainer">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnVfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::ProtocolContainer"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnWfMfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple CapsulePart" sections="_WdNAP_MfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnavMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnWvMfEeSMV8TyMaa7Sg" name="isMultipleCapsulePart">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnW_MfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::CapsulePart"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnXPMfEeSMV8TyMaa7Sg" name="Single RTRExcludedElement" sections="_WdNAQPMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbPMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnXfMfEeSMV8TyMaa7Sg" name="isSingleRTRExcludedElement">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnXvMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTRExcludedElement"/>
+ </constraints>
+ </views>
+ <views xmi:id="_WdNnX_MfEeSMV8TyMaa7Sg" elementMultiplicity="-1" name="Multiple RTRExcludedElement" sections="_WdNAQfMfEeSMV8TyMaa7Sg" automaticContext="true" datacontexts="_WdNnbPMfEeSMV8TyMaa7Sg">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_WdNnYPMfEeSMV8TyMaa7Sg" name="isMultipleRTRExcludedElement">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_WdNnYfMfEeSMV8TyMaa7Sg" name="stereotypeName" value="UMLRealTime::RTRExcludedElement"/>
+ </constraints>
+ </views>
+ <views xmi:id="_ViewID_SingleRTTrigger" name="Single RTTrigger" sections="_SectID_SingleRTTrigger" automaticContext="true" datacontexts="_DC_ID_Trigger">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_ConID_SingleTrigger" name="isSingleRTTrigger">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_ValID_SingleTrigger" name="umlClassName" value="Trigger"/>
+ </constraints>
+ </views>
+ <views xmi:id="_ViewID_MultRTTrigger" elementMultiplicity="-1" name="Multiple RTTrigger" sections="_SectID_MultRTTrigger" automaticContext="true" datacontexts="_DC_ID_Trigger">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_ConID_MultTrigger" name="isMultipleRTTrigger">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_ValID_MultTrigger" name="umlClassName" value="Trigger"/>
+ </constraints>
+ </views>
+ <dataContexts xmi:id="_WdNnYvMfEeSMV8TyMaa7Sg" name="UMLRealTime">
+ <elements xmi:id="_WdNnY_MfEeSMV8TyMaa7Sg" name="RTPort">
+ <properties xmi:id="_WdNnZPMfEeSMV8TyMaa7Sg" name="isNotification" type="Boolean"/>
+ <properties xmi:id="_WdNnZfMfEeSMV8TyMaa7Sg" name="isPublish" type="Boolean"/>
+ <properties xmi:id="_WdNnZvMfEeSMV8TyMaa7Sg" name="isWired" type="Boolean"/>
+ <properties xmi:id="_WdNnZ_MfEeSMV8TyMaa7Sg" name="registration" type="Enumeration" description=""/>
+ <properties xmi:id="_WdNnaPMfEeSMV8TyMaa7Sg" name="registrationOverride" description=""/>
+ <properties xmi:id="_QhkXQC6_EeWWx70qeJ-t-Q" name="kind" label="" type="Enumeration" description=""/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690ylaDJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="_WdNnafMfEeSMV8TyMaa7Sg" name="RTConnector">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yvqDJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="_WdNnavMfEeSMV8TyMaa7Sg" name="CapsulePart">
+ <properties xmi:id="_8KJ-8ETHEeWh8r-Cla6cZg" name="kind" label="" type="Enumeration"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yG6DJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="_WdNna_MfEeSMV8TyMaa7Sg" name="ProtocolContainer">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690xiaDJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="_WdNnbPMfEeSMV8TyMaa7Sg" name="RTRExcludedElement">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.17"/>
+ </elements>
+ <elements xmi:id="_WdNnbfMfEeSMV8TyMaa7Sg" name="Capsule">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yXqDJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="_WdNnbvMfEeSMV8TyMaa7Sg" name="RTMessageSet">
+ <properties xmi:id="_WdNnb_MfEeSMV8TyMaa7Sg" name="rtMsgKind" type="Enumeration"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.48"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrusrt.umlrt.tooling.ui/environment/Environment.xmi#//@modelElementFactories.1"/>
+ </dataContexts>
+ <dataContexts xmi:id="_WdNncPMfEeSMV8TyMaa7Sg" name="UMLRealTimeExt">
+ <elements xmi:id="_WdNncfMfEeSMV8TyMaa7Sg" name="Protocol">
+ <properties xmi:id="_WdNncvMfEeSMV8TyMaa7Sg" name="provides" type="Reference"/>
+ <properties xmi:id="_WdNnc_MfEeSMV8TyMaa7Sg" name="required" type="Reference"/>
+ <properties xmi:id="_WdNndPMfEeSMV8TyMaa7Sg" name="provreq" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690y4KDJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="_SIdvoDIMEeWNUrU2mjUBfw" name="Port">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690ylaDJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="UMLRealTimeExtCapsulePartElement" name="Property">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690yG6DJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xmi:id="_DC_ID_Trigger" name="RTTrigger">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_690ykaDJEeSZxfCXzZz3-w"/>
+ </elements>
+ <elements xsi:type="contexts:DataContextRoot" xmi:id="_XDD68EZQEeWh8r-Cla6cZg" name="RTMultiplicity">
+ <properties xmi:id="_XDD68UZQEeWh8r-Cla6cZg" name="RTmultiplicity" label="Multiplicity" type="Reference" description="Only n or 0..n multiplicity is allowed for Capsule Part"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_6964oaDJEeSZxfCXzZz3-w"/>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.umlrt.properties/propertyView/UML-RT/Environment.xmi#//@modelElementFactories.0"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrusrt.umlrt.tooling.ui/environment/Environment.xmi#//@modelElementFactories.0"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/RTStereotypeModelElement.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/RTStereotypeModelElement.java index cfdebd5ab..12b1f6f41 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/RTStereotypeModelElement.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/RTStereotypeModelElement.java @@ -18,6 +18,7 @@ import java.util.Map; import org.eclipse.core.databinding.observable.IObservable; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; @@ -28,6 +29,7 @@ import org.eclipse.papyrusrt.umlrt.core.utils.IRealTimeConstants; import org.eclipse.papyrusrt.umlrt.core.utils.RTPortKindEnum; import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.CapsulePart; import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.RTPort; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; import org.eclipse.papyrusrt.umlrt.tooling.ui.widgets.CapsulePartKindObservableValue; import org.eclipse.papyrusrt.umlrt.tooling.ui.widgets.PortRTKindObservableValue; import org.eclipse.uml2.uml.Stereotype; @@ -45,16 +47,17 @@ public class RTStereotypeModelElement extends StereotypeModelElement { @Override protected boolean isFeatureEditable(final String propertyPath) { boolean editable = true; + EStructuralFeature feature = getFeature(propertyPath); if (stereoApplication instanceof RTPort) { if (IRealTimeConstants.KIND.equals(propertyPath)) { editable = true; - } else if (IRealTimeConstants.NOTIFICATION.equals(propertyPath)) { + } else if (UMLRealTimePackage.eINSTANCE.getRTPort_IsNotification().equals(feature)) { editable = true; // TODO: This method is not updated when values are changed (good value would be when portHelper.isBehavior(port);) - } else if (IRealTimeConstants.WIRED.equals(propertyPath)) { + } else if (UMLRealTimePackage.eINSTANCE.getRTPort_IsWired().equals(feature)) { editable = true; // TODO: This method is not updated when values are changed (good value would be when portHelper.isBehavior(port) || portHelper.isConnected(port);) - } else if (IRealTimeConstants.PUBLISH.equals(propertyPath)) { + } else if (UMLRealTimePackage.eINSTANCE.getRTPort_IsPublish().equals(feature)) { editable = false; } } else if (stereoApplication instanceof CapsulePart) { diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/UMLRTExtModelElement.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/UMLRTExtModelElement.java index 683693ec4..f7b634963 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/UMLRTExtModelElement.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/modelelement/UMLRTExtModelElement.java @@ -158,7 +158,6 @@ public class UMLRTExtModelElement extends UMLModelElement { @Override public IObservable doGetObservable(String propertyPath) { - IObservable observable = null; Interface intf = getInOrInoutOrOutMessageSet(propertyPath); @@ -232,15 +231,18 @@ public class UMLRTExtModelElement extends UMLModelElement { @Override protected boolean isFeatureEditable(String propertyPath) { boolean editable = false; + EStructuralFeature feature = getFeature(propertyPath); + if (source instanceof Port) { - Port port = (Port) source; + // Rules defined by the Client - if (IRealTimeConstants.SERVICE.equals(propertyPath)) { + + if (UMLPackage.eINSTANCE.getPort_IsService().equals(feature)) { editable = true; // TODO: This method is called only when view opening (good value would be when portHelper.isBehavior(port) && !portHelper.isConnected(port);) - } else if (IRealTimeConstants.BEHAVIOR.equals(propertyPath)) { + } else if (UMLPackage.eINSTANCE.getPort_IsBehavior().equals(feature)) { editable = true; // TODO: This method is called only when view opening (good value would be when !(!portHelper.isWired(port) || (portHelper.isWired(port) && !portHelper.isService(port)));) - } else if (IRealTimeConstants.CONJUGATED.equals(propertyPath)) { + } else if (UMLPackage.eINSTANCE.getPort_IsConjugated().equals(feature)) { editable = true; } else if (IRealTimeConstants.PROTOCOL_TYPE.equals(propertyPath)) { editable = true; diff --git a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/widgets/PortRTKindObservableValue.java b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/widgets/PortRTKindObservableValue.java index 0cbc69a51..b035b5e4f 100644 --- a/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/widgets/PortRTKindObservableValue.java +++ b/plugins/umlrt/tooling/org.eclipse.papyrusrt.umlrt.tooling.ui/src/org/eclipse/papyrusrt/umlrt/tooling/ui/widgets/PortRTKindObservableValue.java @@ -13,8 +13,6 @@ package org.eclipse.papyrusrt.umlrt.tooling.ui.widgets; import org.eclipse.core.databinding.observable.Diffs; import org.eclipse.core.databinding.observable.IObserving; -import org.eclipse.core.databinding.observable.value.IValueChangeListener; -import org.eclipse.core.databinding.observable.value.ValueChangeEvent; import org.eclipse.core.databinding.observable.value.ValueDiff; import org.eclipse.emf.common.command.Command; import org.eclipse.emf.common.command.CompoundCommand; @@ -30,11 +28,11 @@ import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; import org.eclipse.papyrus.uml.tools.databinding.PapyrusObservableValue; -import org.eclipse.papyrusrt.umlrt.core.utils.IRealTimeConstants; import org.eclipse.papyrusrt.umlrt.core.utils.RTPortKindEnum; import org.eclipse.papyrusrt.umlrt.core.utils.RTPortUtils; -import org.eclipse.uml2.uml.Element; +import org.eclipse.papyrusrt.umlrt.profile.UMLRealTime.UMLRealTimePackage; import org.eclipse.uml2.uml.Port; +import org.eclipse.uml2.uml.UMLPackage; import org.eclipse.uml2.uml.util.UMLUtil; /** @@ -266,8 +264,8 @@ public class PortRTKindObservableValue extends PapyrusObservableValue implements */ protected Command getSetPublishCommand(final boolean publish) { IElementEditService serviceEdit = ElementEditServiceUtils.getCommandProvider(stereotypeApplication); - - SetRequest request = new SetRequest(stereotypeApplication, stereotypeApplication.eClass().getEStructuralFeature(IRealTimeConstants.PUBLISH), publish); + EStructuralFeature feature = UMLRealTimePackage.eINSTANCE.getRTPort_IsPublish(); + SetRequest request = new SetRequest(stereotypeApplication, feature, publish); ICommand gmfCommand = serviceEdit.getEditCommand(request); Command cmd = GMFtoEMFCommandWrapper.wrap(gmfCommand); @@ -284,8 +282,8 @@ public class PortRTKindObservableValue extends PapyrusObservableValue implements */ protected Command getSetWiredCommand(final boolean wired) { IElementEditService serviceEdit = ElementEditServiceUtils.getCommandProvider(stereotypeApplication); - - SetRequest request = new SetRequest(stereotypeApplication, stereotypeApplication.eClass().getEStructuralFeature(IRealTimeConstants.WIRED), wired); + EStructuralFeature feature = UMLRealTimePackage.eINSTANCE.getRTPort_IsWired(); + SetRequest request = new SetRequest(stereotypeApplication, feature, wired); ICommand gmfCommand = serviceEdit.getEditCommand(request); Command cmd = GMFtoEMFCommandWrapper.wrap(gmfCommand); @@ -302,8 +300,8 @@ public class PortRTKindObservableValue extends PapyrusObservableValue implements protected Command getSetServiceCommand(final boolean service) { Command cmd = null; IElementEditService serviceEdit = ElementEditServiceUtils.getCommandProvider(port); - - SetRequest request = new SetRequest(port, port.eClass().getEStructuralFeature(IRealTimeConstants.SERVICE), service); + EStructuralFeature feature = UMLPackage.eINSTANCE.getPort_IsService(); + SetRequest request = new SetRequest(port, feature, service); ICommand gmfCommand = serviceEdit.getEditCommand(request); cmd = GMFtoEMFCommandWrapper.wrap(gmfCommand); @@ -320,8 +318,8 @@ public class PortRTKindObservableValue extends PapyrusObservableValue implements protected Command getSetBehaviorCommand(final boolean behavior) { Command cmd = null; IElementEditService serviceEdit = ElementEditServiceUtils.getCommandProvider(port); - - SetRequest request = new SetRequest(port, port.eClass().getEStructuralFeature(IRealTimeConstants.BEHAVIOR), behavior); + EStructuralFeature feature = UMLPackage.eINSTANCE.getPort_IsBehavior(); + SetRequest request = new SetRequest(port, feature, behavior); ICommand gmfCommand = serviceEdit.getEditCommand(request); cmd = GMFtoEMFCommandWrapper.wrap(gmfCommand); |
