diff options
author | rschnekenbu | 2013-06-07 17:16:18 +0000 |
---|---|---|
committer | rschnekenbu | 2013-06-07 17:16:18 +0000 |
commit | 215f368866bd390e1e804320361f4e930fc3a87e (patch) | |
tree | 6055b4bf8bf774a46a8fbbdb5aeaa2f0961ccbbc /plugins/uml | |
parent | 96b7c5bf063207ed18d35a43f5bdea18ca7951f5 (diff) | |
download | org.eclipse.papyrus-215f368866bd390e1e804320361f4e930fc3a87e.tar.gz org.eclipse.papyrus-215f368866bd390e1e804320361f4e930fc3a87e.tar.xz org.eclipse.papyrus-215f368866bd390e1e804320361f4e930fc3a87e.zip |
410221: [Profile Diagram] Papyrus shall provide a Context Link for Profile Diagrams
https://bugs.eclipse.org/bugs/show_bug.cgi?id=410221
Diffstat (limited to 'plugins/uml')
80 files changed, 2162 insertions, 95 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomContextLinkCreateCommand.java new file mode 100644 index 00000000000..fee196af483 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomContextLinkCreateCommand.java @@ -0,0 +1,59 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Boutheina Bannour (CEA LIST) boutheina.bannour@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.custom.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Namespace;
+
+/**
+ * use to construct the instance specification link between two instance
+ *
+ */
+public class CustomContextLinkCreateCommand extends ContextLinkCreateCommand {
+
+
+ public CustomContextLinkCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request, source, target);
+ }
+
+ @Override
+ public boolean canExecute() {
+ if(source == null && target == null) {
+ return false;
+ }
+ if(source != null && false == source instanceof Constraint) {
+ return false;
+ }
+ if(target != null && false == target instanceof Namespace) {
+ return false;
+ }
+ if(getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ if(getSource() != null) {
+ // the context is already set
+ if(getSource().getContext() != null && target != null && getSource().getContext() != target) {
+ return false;
+ }
+ }
+ if(getTarget() != null && (getTarget().getOwnedRules().contains(getTarget()))) {
+ return false;
+ }
+ return true;
+ }
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationBranchContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationBranchContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..e9b44cfca3f --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationBranchContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomAssociationBranchContextLinkSemanticEditPolicy extends CustomAssociationBranchItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..efb5952a6e2 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomAssociationContextLinkSemanticEditPolicy extends CustomAssociationItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationNodeContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationNodeContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..13227573759 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomAssociationNodeContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomAssociationNodeContextLinkSemanticEditPolicy extends CustomAssociationNodeItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomConstraintCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomConstraintCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..1d656505865 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomConstraintCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,48 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ConstraintItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomConstraintCNContextLinkSemanticEditPolicy extends ConstraintItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getStartCreateRelationshipCommand(req);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomConstraintContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomConstraintContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..8093cfaa0d1 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomConstraintContextLinkSemanticEditPolicy.java @@ -0,0 +1,48 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ConstraintItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomConstraintContextLinkSemanticEditPolicy extends ConstraintItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getStartCreateRelationshipCommand(req);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomDataTypeCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomDataTypeCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..82a5f1abaab --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomDataTypeCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomDataTypeCNContextLinkSemanticEditPolicy extends CustomDataTypeItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomDataTypeContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomDataTypeContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..6fdf56d60ac --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomDataTypeContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomDataTypeContextLinkSemanticEditPolicy extends CustomDataTypeItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomEnumerationCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomEnumerationCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..28511191e3b --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomEnumerationCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomEnumerationCNContextLinkSemanticEditPolicy extends CustomEnumerationItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomEnumerationContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomEnumerationContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..b64de386aa9 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomEnumerationContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomEnumerationContextLinkSemanticEditPolicy extends CustomEnumerationItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomExtensionContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomExtensionContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..23c8a050b9a --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomExtensionContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomExtensionContextLinkSemanticEditPolicy extends CustomExtensionItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomModelCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomModelCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..d6696dbd0eb --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomModelCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,37 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ModelItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomModelCNContextLinkSemanticEditPolicy extends ModelItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomModelContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomModelContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..0bab122dc2c --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomModelContextLinkSemanticEditPolicy.java @@ -0,0 +1,37 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ModelItemSemanticEditPolicyTN;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomModelContextLinkSemanticEditPolicy extends ModelItemSemanticEditPolicyTN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPackageCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPackageCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..78c17a9c94e --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPackageCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,37 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.PackageItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomPackageCNContextLinkSemanticEditPolicy extends PackageItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPackageContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPackageContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..fc5e43926f8 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPackageContextLinkSemanticEditPolicy.java @@ -0,0 +1,37 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.PackageItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomPackageContextLinkSemanticEditPolicy extends PackageItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..96237b68990 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomPrimitiveTypeCNContextLinkSemanticEditPolicy extends CustomPrimitiveTypeItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..4139d953a89 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomPrimitiveTypeContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomPrimitiveTypeContextLinkSemanticEditPolicy extends CustomPrimitiveTypeItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomProfileCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomProfileCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..c8e6a020127 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomProfileCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,37 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ProfileItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomProfileCNContextLinkSemanticEditPolicy extends ProfileItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomProfileContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomProfileContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..9868e4f2b06 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomProfileContextLinkSemanticEditPolicy.java @@ -0,0 +1,37 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ProfileItemSemanticEditPolicyTN;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomProfileContextLinkSemanticEditPolicy extends ProfileItemSemanticEditPolicyTN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomStereotypeCNContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomStereotypeCNContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..330c254afca --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomStereotypeCNContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomStereotypeCNContextLinkSemanticEditPolicy extends CustomStereotypeItemSemanticEditPolicyCN {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomStereotypeContextLinkSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomStereotypeContextLinkSemanticEditPolicy.java new file mode 100644 index 00000000000..02838204e76 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomStereotypeContextLinkSemanticEditPolicy.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * Custom Semantic Edit Policy to manage custom context link
+ */
+public class CustomStereotypeContextLinkSemanticEditPolicy extends CustomStereotypeItemSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.ConstraintContext_8500 == req.getElementType()) {
+ return getGEFWrapper(new CustomContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/providers/CustomNamespaceEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/providers/CustomNamespaceEditPolicyProvider.java new file mode 100644 index 00000000000..ec3323dce75 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/providers/CustomNamespaceEditPolicyProvider.java @@ -0,0 +1,197 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Boutheina Bannour (boutheina.bannour@cea.fr) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.providers;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationBranchContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationNodeContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomConstraintCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomConstraintContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomDataTypeCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomDataTypeContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomEnumerationCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomEnumerationContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomExtensionContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomModelCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomModelContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPackageCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPackageContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomProfileCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomProfileContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeCNContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeContextLinkSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartTN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileEditPartTN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeEditPartCN;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Namespace;
+
+/**
+ * Edit Policy provider to manage custom creation command for Context links
+ *
+ */
+public class CustomNamespaceEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean provides(IOperation operation) {
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
+ EditPart editPart = epOperation.getEditPart();
+ if(editPart == null) {
+ return false;
+ }
+ EObject eElement = EMFHelper.getEObject(editPart);
+ if(!(eElement instanceof Namespace) && !(eElement instanceof Constraint)) {
+ return false;
+ }
+ try {
+ // check whether the element is a papyrus element.
+ ServicesRegistry registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(eElement);
+ if(registry == null) {
+ return false;
+ }
+ } catch (Exception ex) {
+ return false;
+ }
+ // primary edit part is the toplevel (main) editpart
+ return (editPart instanceof IPrimaryEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void createEditPolicies(EditPart editPart) {
+ // install policy for Packages
+ if(editPart instanceof PackageEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPackageContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof PackageEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPackageCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ // install policy for Packages
+ if(editPart instanceof ModelEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomModelCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof ModelEditPartTN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomModelContextLinkSemanticEditPolicy());
+ return;
+ }
+ // install policy for Profile Edit Parts
+ if(editPart instanceof ProfileEditPartTN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomProfileContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof ProfileEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomProfileCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ // stereotype
+ if(editPart instanceof StereotypeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomStereotypeContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof StereotypeEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomStereotypeCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ // install policy for Association Edit Parts
+ if(editPart instanceof AssociationBranchEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomAssociationBranchContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof AssociationEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomAssociationContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof AssociationNodeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomAssociationNodeContextLinkSemanticEditPolicy());
+ return;
+ }
+ // datatype
+ if(editPart instanceof DataTypeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDataTypeContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof DataTypeEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDataTypeCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ // datatype
+ if(editPart instanceof PrimitiveTypeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPrimitiveTypeContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof PrimitiveTypeEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomPrimitiveTypeCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ // Enumeration
+ if(editPart instanceof EnumerationEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomEnumerationContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof EnumerationEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomEnumerationCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ // Extension
+ if(editPart instanceof ExtensionEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomExtensionContextLinkSemanticEditPolicy());
+ return;
+ }
+ // Constraint (to allow creation of the link on a constraint that already has a context )
+ if(editPart instanceof ConstraintEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomConstraintContextLinkSemanticEditPolicy());
+ return;
+ }
+ if(editPart instanceof ConstraintEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomConstraintCNContextLinkSemanticEditPolicy());
+ return;
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties index ced4d50b62c..5589ac3550f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties @@ -53,24 +53,22 @@ createFeatures4Group_title=Features createFeatures4Group_desc=Features createPackage1CreationTool_title=Package createPackage1CreationTool_desc=Create a new Package -createModel2CreationTool_title=Model -createModel2CreationTool_desc=Add a model -createProfile3CreationTool_title=Profile -createProfile3CreationTool_desc=Add a new Profile -createComment4CreationTool_title=Comment -createComment4CreationTool_desc=Create new comment -createConstraint5CreationTool_title=Constraint -createConstraint5CreationTool_desc=Create a constraint -createStereotype2CreationTool_title=Stereotype -createStereotype2CreationTool_desc=Add new Stereotype -createImportMetaclass3CreationTool_title=Import Metaclass -createImportMetaclass3CreationTool_desc=Import a new Metaclass -createEnumeration4CreationTool_title=Enumeration -createEnumeration4CreationTool_desc=Create new Enumeration -createDataType5CreationTool_title=DataType -createDataType5CreationTool_desc=Create new DataType -createPrimitiveType6CreationTool_title=PrimitiveType -createPrimitiveType6CreationTool_desc=Create new PrimitiveType +createProfile2CreationTool_title=Profile +createProfile2CreationTool_desc=Add a new Profile +createComment3CreationTool_title=Comment +createComment3CreationTool_desc=Create new comment +createConstraint4CreationTool_title=Constraint +createConstraint4CreationTool_desc=Create a constraint +createStereotype1CreationTool_title=Stereotype +createStereotype1CreationTool_desc=Add new Stereotype +createImportMetaclass2CreationTool_title=Import Metaclass +createImportMetaclass2CreationTool_desc=Import a new Metaclass +createEnumeration3CreationTool_title=Enumeration +createEnumeration3CreationTool_desc=Create new Enumeration +createDataType4CreationTool_title=DataType +createDataType4CreationTool_desc=Create new DataType +createPrimitiveType5CreationTool_title=PrimitiveType +createPrimitiveType5CreationTool_desc=Create new PrimitiveType createExtension1CreationTool_title=Extension createExtension1CreationTool_desc=Add an Extension createGeneralization2CreationTool_title=Generalization @@ -79,20 +77,16 @@ createLink3CreationTool_title=Link createLink3CreationTool_desc=Create a link for Comment, Constraint createProfileApplication4CreationTool_title=ProfileApplication createProfileApplication4CreationTool_desc=Create a ProfileApplication -createElementImport5CreationTool_title=ElementImport -createElementImport5CreationTool_desc=Create an ElementImport -createPackageImport6CreationTool_title=PackageImport -createPackageImport6CreationTool_desc=Create a PackageImport -createDependency7CreationTool_title=Dependency -createDependency7CreationTool_desc=Create a Dependency -createAssociation8CreationTool_title=Association -createAssociation8CreationTool_desc=Create an Association +createAssociation5CreationTool_title=Association +createAssociation5CreationTool_desc=Create an Association createProperty1CreationTool_title=Property createProperty1CreationTool_desc=Add new property createOperation2CreationTool_title=Operation createOperation2CreationTool_desc=Add new operation createEnumerationLiteral3CreationTool_title=EnumerationLiteral createEnumerationLiteral3CreationTool_desc=Add new EnumerationLiteral +createContextLink6CreationTool_title=ContextLink +createContextLink6CreationTool_desc=Creation of a context link for a Constraint PackagePackageableElementCompartmentEditPart_title=PackageableElementCompartment PackagePackageableElementCompartmentEditPartCN_title=PackageableElementCompartment ProfilePackageableElementCompartmentEditPartTN_title=ProfilePackageableElementCompartment @@ -111,27 +105,6 @@ DataTypeOperationCompartmentEditPart_title=DataTypeOperationCompartment DataTypeOperationCompartmentEditPartCN_title=DataTypeOperationCompartment CommandName_OpenDiagram=Open Diagram NavigatorActionProvider_OpenDiagramActionName=Open Diagram -AbstractParser_UnexpectedValueType=Value of type {0} is expected -AbstractParser_WrongStringConversion=String value does not convert to {0} value -AbstractParser_UnknownLiteral=Unknown literal: {0} MessageFormatParser_InvalidInputError=Invalid input at {0} UMLModelingAssistantProviderTitle=Select domain model element UMLModelingAssistantProviderMessage=Available domain model elements: -createProfile2CreationTool_title=Profile -createProfile2CreationTool_desc=Add a new Profile -createComment3CreationTool_title=Comment -createComment3CreationTool_desc=Create new comment -createConstraint4CreationTool_title=Constraint -createConstraint4CreationTool_desc=Create a constraint -createAssociation5CreationTool_title=Association -createAssociation5CreationTool_desc=Create an Association -createStereotype1CreationTool_title=Stereotype -createStereotype1CreationTool_desc=Add new Stereotype -createImportMetaclass2CreationTool_title=Import Metaclass -createImportMetaclass2CreationTool_desc=Import a new Metaclass -createEnumeration3CreationTool_title=Enumeration -createEnumeration3CreationTool_desc=Create new Enumeration -createDataType4CreationTool_title=DataType -createDataType4CreationTool_desc=Create new DataType -createPrimitiveType5CreationTool_title=PrimitiveType -createPrimitiveType5CreationTool_desc=Create new PrimitiveType diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen index 38498930543..8ae6b54db6c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen @@ -1090,6 +1090,17 @@ </modelFacet>
<creationConstraints targetEnd="/0/@expressionProviders/@providers.0/@expressions.18"/>
</links>
+ <links visualID="8500" editPartClassName="ContextLinkEditPart" itemSemanticEditPolicyClassName="ContextLinkItemSemanticEditPolicy" createCommandClassName="ContextLinkCreateCommand" reorientCommandClassName="ContextLinkReorientCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="Undefined"/>
+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="ContextLinkDescriptor" classBody="
/**
 * @generated
 */
public class ContextLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public ContextLinkDescriptor() {
		this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASHDOT);

	}




}

">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/context"/>
+ </modelFacet>
+ </links>
<compartments visualID="1005" editPartClassName="PackagePackageableElementCompartmentEditPart" itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14" title="PackageableElementCompartment" canCollapse="false" node="/0/@diagram/@topLevelNodes.8" listLayout="false">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getPackageableElementFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
@@ -1214,6 +1225,7 @@ <entries xsi:type="gmfgen:ToolEntry" title="Link" description="Create a link for Comment, Constraint" largeIconPath="icons/obj16/Link.gif" smallIconPath="icons/obj16/Link.gif" genLinks="/0/@diagram/@links.9 /0/@diagram/@links.10"/>
<entries xsi:type="gmfgen:ToolEntry" title="ProfileApplication" description="Create a ProfileApplication" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif" genLinks="/0/@diagram/@links.2"/>
<entries xsi:type="gmfgen:ToolEntry" title="Association" description="Create an Association" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" genLinks="/0/@diagram/@links.1"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="ContextLink" description="Creation of a context link for a Constraint" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" createMethodName="createContextLink6CreationTool" genLinks="/0/@diagram/@links.11"/>
</groups>
<groups title="Features" description="Features" largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
<entries xsi:type="gmfgen:ToolEntry" title="Property" description="Add new property" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" qualifiedToolName="" genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties index e7a3e9c8bf0..ab264c3543b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties @@ -83,3 +83,4 @@ prefpage.org.eclipse.uml2.uml.diagram.connections=Connections prefpage.org.eclipse.uml2.uml.diagram.pathmaps=Pathmaps metatype.name.PrimitiveType_3026=PrimitiveType metatype.name.PrimitiveType_2009=PrimitiveType +metatype.name.ConstraintContext_8500=Undefined diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml index b42404b3167..bcbb6c333be 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml @@ -171,6 +171,16 @@ </entry>
<entry
defineOnly="true"
+ description="Creation of a context link for a Constraint"
+ id="createContextLink6CreationTool"
+ kind="tool"
+ label="ContextLink"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+ <entry
+ defineOnly="true"
description="Add new property"
id="createProperty1CreationTool"
kind="tool"
@@ -316,6 +326,10 @@ id="createAssociation5CreationTool"
path="/createRelationShips3Group">
</predefinedEntry>
+ <predefinedEntry
+ id="createContextLink6CreationTool"
+ path="/createRelationShips3Group">
+ </predefinedEntry>
<entry
description="Features"
@@ -365,7 +379,7 @@ <Priority name="Lowest"/> <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLProfileDiagram"/> <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/> - <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014"/> + <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014,8500"/> </viewProvider> </extension> @@ -380,7 +394,7 @@ <method name="getType()" value="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/> </object> <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links"> - <method name="getType()" value="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014"/> + <method name="getType()" value="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014,8500"/> </object> <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels"> <method name="getType()" value="1,1034,1084,3,1015,5063,5020,1047,5026,5023,5032,5035,2,5058,1046,5062,1008,1056,1050,1010,1059,5064,5055,5061"/> @@ -879,6 +893,15 @@ <param name="semanticHint" value="4014"/> </specializationType> </metamodel> + <metamodel nsURI="http://www.eclipse.org/uml2/4.0.0/UML"> + <specializationType + id="org.eclipse.papyrus.uml.diagram.profile.ConstraintContext_8500" + name="%metatype.name.ConstraintContext_8500" + kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"> + <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/> + <param name="semanticHint" value="8500"/> + </specializationType> + </metamodel> </extension> <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings"> @@ -934,6 +957,7 @@ <elementType ref="org.eclipse.papyrus.uml.diagram.profile.PackageImport_1065"/> <elementType ref="org.eclipse.papyrus.uml.diagram.profile.CommentAnnotatedElement_1022"/> <elementType ref="org.eclipse.papyrus.uml.diagram.profile.ConstraintConstrainedElement_4014"/> + <elementType ref="org.eclipse.papyrus.uml.diagram.profile.ConstraintContext_8500"/> <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/> </binding> </extension> @@ -1408,22 +1432,6 @@ <?gmfgen generated="true"?>
<page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLProfileDiagram"
- class="org.eclipse.papyrus.uml.diagram.profile.preferences.PackageImportPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.profile.preferences.PackageImportPreferencePage"
- name="PackageImport Link" />
-
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLProfileDiagram"
- class="org.eclipse.papyrus.uml.diagram.profile.preferences.ExtensionPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.profile.preferences.ExtensionPreferencePage"
- name="Extension Link" />
-
-
-
- <?gmfgen generated="true"?>
- <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLProfileDiagram"
class="org.eclipse.papyrus.uml.diagram.profile.preferences.AssociationPreferencePage"
id="org.eclipse.papyrus.uml.diagram.profile.preferences.AssociationPreferencePage"
name="Association Link" />
@@ -1448,19 +1456,35 @@ <?gmfgen generated="true"?>
<page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLProfileDiagram"
- class="org.eclipse.papyrus.uml.diagram.profile.preferences.ProfileApplicationPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.profile.preferences.ProfileApplicationPreferencePage"
- name="ProfileApplication Link" />
+ class="org.eclipse.papyrus.uml.diagram.profile.preferences.DependencyPreferencePage"
+ id="org.eclipse.papyrus.uml.diagram.profile.preferences.DependencyPreferencePage"
+ name="Dependency Link" />
+
+ <?gmfgen generated="true"?>
+ <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLProfileDiagram"
+ class="org.eclipse.papyrus.uml.diagram.profile.preferences.PackageImportPreferencePage"
+ id="org.eclipse.papyrus.uml.diagram.profile.preferences.PackageImportPreferencePage"
+ name="PackageImport Link" />
<?gmfgen generated="true"?>
<page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLProfileDiagram"
- class="org.eclipse.papyrus.uml.diagram.profile.preferences.DependencyPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.profile.preferences.DependencyPreferencePage"
- name="Dependency Link" />
+ class="org.eclipse.papyrus.uml.diagram.profile.preferences.ExtensionPreferencePage"
+ id="org.eclipse.papyrus.uml.diagram.profile.preferences.ExtensionPreferencePage"
+ name="Extension Link" />
+
+
+
+ <?gmfgen generated="true"?>
+ <page category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLProfileDiagram"
+ class="org.eclipse.papyrus.uml.diagram.profile.preferences.ProfileApplicationPreferencePage"
+ id="org.eclipse.papyrus.uml.diagram.profile.preferences.ProfileApplicationPreferencePage"
+ name="ProfileApplication Link" />
+
+
</extension>
@@ -1502,5 +1526,14 @@ - <!-- optionally, specify keybindings --> + <!-- optionally, specify keybindings -->
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.uml.diagram.profile.custom.providers.CustomNamespaceEditPolicyProvider">
+ <Priority
+ name="Lowest">
+ </Priority>
+ </editpolicyProvider>
+</extension> </plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java new file mode 100644 index 00000000000..1bce738cae3 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java @@ -0,0 +1,91 @@ +package org.eclipse.papyrus.uml.diagram.profile.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Namespace;
+
+/**
+ * @generated
+ */
+public class ContextLinkCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ public ContextLinkCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ if(source == null && target == null) {
+ return false;
+ }
+ if(source != null && false == source instanceof Constraint) {
+ return false;
+ }
+ if(target != null && false == target instanceof Namespace) {
+ return false;
+ }
+ if(getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateConstraintContext_8500(getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if(!canExecute()) {
+ throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
+ }
+ if(getSource() != null && getTarget() != null) {
+ getSource().setContext(getTarget());
+ }
+ return CommandResult.newOKCommandResult();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected Constraint getSource() {
+ return (Constraint)source;
+ }
+
+ /**
+ * @generated
+ */
+ protected Namespace getTarget() {
+ return (Namespace)target;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java new file mode 100644 index 00000000000..0e05f52bb60 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java @@ -0,0 +1,147 @@ +package org.eclipse.papyrus.uml.diagram.profile.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Namespace;
+
+/**
+ * @generated
+ */
+public class ContextLinkReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public ContextLinkReorientCommand(ReorientReferenceRelationshipRequest request) {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ if(false == referenceOwner instanceof Constraint) {
+ return false;
+ }
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if(!(oldEnd instanceof Namespace && newEnd instanceof Constraint)) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintContext_8500(getNewSource(), getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if(!(oldEnd instanceof Namespace && newEnd instanceof Namespace)) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintContext_8500(getOldSource(), getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if(!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getOldSource().setContext(null);
+ getNewSource().setContext(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getOldSource().setContext(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected Constraint getOldSource() {
+ return (Constraint)referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected Constraint getNewSource() {
+ return (Constraint)newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Namespace getOldTarget() {
+ return (Namespace)oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Namespace getNewTarget() {
+ return (Namespace)newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java index 61e0fc99ca1..956588df5c7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java @@ -650,7 +650,7 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -659,6 +659,7 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -769,6 +770,9 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java index 5d41d315dfb..b483c7ad87d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java @@ -292,10 +292,11 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(3);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -490,6 +491,57 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { if(targetEditPart instanceof DataTypeEditPartCN) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
return types;
}
@@ -563,6 +615,24 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java index e51be01d836..25d0b2061a4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java @@ -288,10 +288,11 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(3);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -486,6 +487,57 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { if(targetEditPart instanceof DataTypeEditPartCN) {
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
}
+ if(targetEditPart instanceof AssociationNodeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof StereotypeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof MetaclassEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ModelEditPartTN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ProfileEditPartTN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PackageEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof EnumerationEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof DataTypeEditPart) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PrimitiveTypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof StereotypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof MetaclassEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ModelEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof ProfileEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof PackageEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof EnumerationEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
+ if(targetEditPart instanceof DataTypeEditPartCN) {
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ }
return types;
}
@@ -559,6 +611,24 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { types.add(UMLElementTypes.Constraint_1028);
types.add(UMLElementTypes.Enumeration_3025);
types.add(UMLElementTypes.DataType_3027);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Association_2015);
+ types.add(UMLElementTypes.Stereotype_1026);
+ types.add(UMLElementTypes.Class_1031);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Profile_1030);
+ types.add(UMLElementTypes.Package_2007);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.Stereotype_1023);
+ types.add(UMLElementTypes.Class_3028);
+ types.add(UMLElementTypes.Model_1027);
+ types.add(UMLElementTypes.Profile_1024);
+ types.add(UMLElementTypes.Package_1012);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.DataType_3027);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java new file mode 100644 index 00000000000..038f1249854 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java @@ -0,0 +1,71 @@ +package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ContextLinkItemSemanticEditPolicy;
+
+/**
+ * @generated
+ */
+public class ContextLinkEditPart extends ConnectionEditPart implements ITreeBranchEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8500;
+
+ /**
+ * @generated
+ */
+ public ContextLinkEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ContextLinkItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected Connection createConnectionFigure() {
+ return new ContextLinkDescriptor();
+ }
+
+ /**
+ * @generated
+ */
+ public ContextLinkDescriptor getPrimaryShape() {
+ return (ContextLinkDescriptor)getFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public class ContextLinkDescriptor extends PolylineConnectionEx {
+
+ /**
+ * @generated
+ */
+ public ContextLinkDescriptor() {
+ this.setLineStyle(Graphics.LINE_DASHDOT);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java index 963bb8858aa..23f617c43e1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java @@ -759,7 +759,7 @@ public class DataTypeEditPart extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -768,6 +768,7 @@ public class DataTypeEditPart extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -878,6 +879,9 @@ public class DataTypeEditPart extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java index 1bdf1f5f4b5..e4f7ac2859b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java @@ -759,7 +759,7 @@ public class DataTypeEditPartCN extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -768,6 +768,7 @@ public class DataTypeEditPartCN extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -878,6 +879,9 @@ public class DataTypeEditPartCN extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java index e8fe8a0f398..0d4672959ce 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java @@ -745,7 +745,7 @@ public class EnumerationEditPart extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -754,6 +754,7 @@ public class EnumerationEditPart extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -864,6 +865,9 @@ public class EnumerationEditPart extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java index 18bda13ca47..4dc8cdca906 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java @@ -743,7 +743,7 @@ public class EnumerationEditPartCN extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -752,6 +752,7 @@ public class EnumerationEditPartCN extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -862,6 +863,9 @@ public class EnumerationEditPartCN extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java index 30e2a4482f8..c881514680d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java @@ -731,7 +731,7 @@ public class MetaclassEditPart extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -740,6 +740,7 @@ public class MetaclassEditPart extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -850,6 +851,9 @@ public class MetaclassEditPart extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java index de29eb7f7f2..6ea32e2ed88 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java @@ -731,7 +731,7 @@ public class MetaclassEditPartCN extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -740,6 +740,7 @@ public class MetaclassEditPartCN extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -850,6 +851,9 @@ public class MetaclassEditPartCN extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java index 1c994cffe5a..e5c5a23945d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java @@ -611,13 +611,14 @@ public class ModelEditPartCN extends NamedElementEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(6);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(7);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.PackageImport_1065);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -710,6 +711,9 @@ public class ModelEditPartCN extends NamedElementEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java index ad2280fc3d3..67ffda1b69a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java @@ -611,13 +611,14 @@ public class ModelEditPartTN extends NamedElementEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(6);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(7);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.PackageImport_1065);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -710,6 +711,9 @@ public class ModelEditPartTN extends NamedElementEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java index 5e423d1ae24..a8de1994907 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java @@ -611,13 +611,14 @@ public class PackageEditPart extends NamedElementEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(6);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(7);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.PackageImport_1065);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -710,6 +711,9 @@ public class PackageEditPart extends NamedElementEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java index 0e15c97a33e..27b85879fe4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java @@ -615,13 +615,14 @@ public class PackageEditPartCN extends NamedElementEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(6);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(7);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.PackageImport_1065);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -714,6 +715,9 @@ public class PackageEditPartCN extends NamedElementEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java index bc01ce1f863..c6c394a1df2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java @@ -723,7 +723,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -732,6 +732,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -842,6 +843,9 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java index 1c52fe2ab8f..7da40089216 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java @@ -723,7 +723,7 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -732,6 +732,7 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -842,6 +843,9 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java index b3222ce73c8..57c6f8b8ebc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java @@ -611,7 +611,7 @@ public class ProfileEditPartCN extends NamedElementEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
types.add(UMLElementTypes.ProfileApplication_1045);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
@@ -619,6 +619,7 @@ public class ProfileEditPartCN extends NamedElementEditPart { types.add(UMLElementTypes.PackageImport_1065);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -718,6 +719,9 @@ public class ProfileEditPartCN extends NamedElementEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java index 840169bc003..c5215eb7326 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java @@ -611,7 +611,7 @@ public class ProfileEditPartTN extends NamedElementEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(7);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(8);
types.add(UMLElementTypes.ProfileApplication_1045);
types.add(UMLElementTypes.Dependency_4008);
types.add(UMLElementTypes.Dependency_4018);
@@ -619,6 +619,7 @@ public class ProfileEditPartTN extends NamedElementEditPart { types.add(UMLElementTypes.PackageImport_1065);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -718,6 +719,9 @@ public class ProfileEditPartTN extends NamedElementEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java index f4081cc0f4c..d244a9c4a8c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java @@ -767,7 +767,7 @@ public class StereotypeEditPart extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -776,6 +776,7 @@ public class StereotypeEditPart extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -886,6 +887,9 @@ public class StereotypeEditPart extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java index d34cd1e9d27..d1f7e0705db 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java @@ -767,7 +767,7 @@ public class StereotypeEditPartCN extends ClassifierEditPart { * @generated
*/
public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(8);
+ ArrayList<IElementType> types = new ArrayList<IElementType>(9);
types.add(UMLElementTypes.Association_4001);
types.add(UMLElementTypes.Association_4019);
types.add(UMLElementTypes.Generalization_4002);
@@ -776,6 +776,7 @@ public class StereotypeEditPartCN extends ClassifierEditPart { types.add(UMLElementTypes.ElementImport_1064);
types.add(UMLElementTypes.CommentAnnotatedElement_1022);
types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ types.add(UMLElementTypes.ConstraintContext_8500);
return types;
}
@@ -886,6 +887,9 @@ public class StereotypeEditPartCN extends ClassifierEditPart { } else if(relationshipType == UMLElementTypes.ConstraintConstrainedElement_4014) {
types.add(UMLElementTypes.Constraint_1014);
types.add(UMLElementTypes.Constraint_1028);
+ } else if(relationshipType == UMLElementTypes.ConstraintContext_8500) {
+ types.add(UMLElementTypes.Constraint_1014);
+ types.add(UMLElementTypes.Constraint_1028);
}
return types;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java index cb104c23887..fa8df539d3d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java @@ -227,6 +227,8 @@ public class UMLEditPartFactory implements EditPartFactory { return new CommentAnnotatedElementEditPart(view);
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return new ConstraintConstrainedElementEditPart(view);
+ case ContextLinkEditPart.VISUAL_ID:
+ return new ContextLinkEditPart(view);
}
}
return createUnrecognizedEditPart(context, model);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java index ca6d66a208d..f3382834748 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java @@ -36,6 +36,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -50,6 +52,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -159,6 +162,9 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -233,6 +239,12 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -274,6 +286,8 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java index 4e5bdb8c6bc..c872d8aef3f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java @@ -36,6 +36,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -50,6 +52,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -159,6 +162,9 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -233,6 +239,12 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -274,6 +286,8 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java index a212e1ae1a4..d49241ebbaf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java @@ -38,6 +38,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -52,6 +54,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -169,6 +172,9 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -243,6 +249,12 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -284,6 +296,8 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java index fa8cd99db29..6f27fc57f90 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java @@ -34,6 +34,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -42,6 +44,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportCreate import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -133,6 +136,12 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -186,6 +195,9 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -219,6 +231,8 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java index 6683a25b0c4..bc0759030bc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java @@ -34,6 +34,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -42,6 +44,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportCreate import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -133,6 +136,12 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -186,6 +195,9 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -219,6 +231,8 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java new file mode 100644 index 00000000000..f0f173135da --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java @@ -0,0 +1,26 @@ +package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ContextLinkItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ContextLinkItemSemanticEditPolicy() {
+ super(UMLElementTypes.ConstraintContext_8500);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
+ return getGEFWrapper(new DestroyReferenceCommand(req));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java index c4b7ab1b07a..e3dda94ab29 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java @@ -42,6 +42,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -56,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationEditPart;
@@ -215,6 +218,9 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -289,6 +295,12 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -330,6 +342,8 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java index cc4331efdbc..60dc25e7e83 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java @@ -42,6 +42,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -56,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationEditPart;
@@ -215,6 +218,9 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -289,6 +295,12 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -330,6 +342,8 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java index 396685dedce..7408b3dfe6a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java @@ -42,6 +42,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -56,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -201,6 +204,9 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -275,6 +281,12 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -316,6 +328,8 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java index 7a899871a6b..a77bd99e538 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java @@ -42,6 +42,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -56,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -201,6 +204,9 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -275,6 +281,12 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -316,6 +328,8 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java index cc325074d3c..dfa23cc6ecf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java @@ -36,6 +36,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -50,6 +52,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -159,6 +162,9 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -233,6 +239,12 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -274,6 +286,8 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java index 8e1f8f0632c..7eea82bf89b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java @@ -38,6 +38,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -54,6 +56,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -175,6 +178,9 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -255,6 +261,12 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -298,6 +310,8 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java index b4767831264..f1ac4b60eed 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java @@ -38,6 +38,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -54,6 +56,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -175,6 +178,9 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -255,6 +261,12 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -298,6 +310,8 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java index 643cb51c47f..f70f9ec45b5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java @@ -41,6 +41,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -57,6 +59,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElemen import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
@@ -152,6 +155,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -190,6 +194,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -229,6 +234,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -284,6 +290,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
@@ -306,6 +313,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -348,6 +356,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -390,6 +399,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -497,6 +507,9 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -559,6 +572,12 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -596,6 +615,8 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java index b1119c4306f..b77de0c55c2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java @@ -41,6 +41,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -57,6 +59,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElemen import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
@@ -152,6 +155,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -190,6 +194,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -229,6 +234,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -284,6 +290,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
@@ -306,6 +313,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -348,6 +356,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -390,6 +399,7 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -497,6 +507,9 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -559,6 +572,12 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -596,6 +615,8 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java index ba6510e5f71..5bb61e20565 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java @@ -41,6 +41,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -57,6 +59,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElemen import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
@@ -152,6 +155,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -190,6 +194,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -229,6 +234,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -284,6 +290,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
@@ -306,6 +313,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -348,6 +356,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -390,6 +399,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -497,6 +507,9 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -559,6 +572,12 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -596,6 +615,8 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java index 667bf6366cd..79079388c29 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java @@ -42,6 +42,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -59,6 +61,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElemen import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
@@ -153,6 +156,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -221,6 +225,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -259,6 +264,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -298,6 +304,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -353,6 +360,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
@@ -375,6 +383,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -417,6 +426,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -459,6 +469,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -566,6 +577,9 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -628,6 +642,12 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -665,6 +685,8 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java index 221cad35a7f..6eab8993b66 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java @@ -38,6 +38,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -52,6 +54,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -169,6 +172,9 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -243,6 +249,12 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -284,6 +296,8 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java index babf1b0dbe9..18a6ac63c7d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java @@ -38,6 +38,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -52,6 +54,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditP import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -169,6 +172,9 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -243,6 +249,12 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -284,6 +296,8 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java index 8e91f2cb5fe..2c1089697ec 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java @@ -41,6 +41,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -57,6 +59,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElemen import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
@@ -129,6 +132,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -172,6 +176,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -210,6 +215,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -249,6 +255,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -304,6 +311,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
@@ -326,6 +334,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -368,6 +377,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -410,6 +420,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -478,6 +489,7 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -586,6 +598,9 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -651,6 +666,12 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -688,6 +709,8 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java index b216ee8034b..df2121f20ee 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java @@ -41,6 +41,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -57,6 +59,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElemen import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
@@ -129,6 +132,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -172,6 +176,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -210,6 +215,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -249,6 +255,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -304,6 +311,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(outgoingLink.getSource().getElement(), null, outgoingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
@@ -326,6 +334,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -368,6 +377,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -410,6 +420,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -478,6 +489,7 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
case CommentAnnotatedElementEditPart.VISUAL_ID:
case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
cmd.add(new DestroyReferenceCommand(destroyRefReq));
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
@@ -586,6 +598,9 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -651,6 +666,12 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -688,6 +709,8 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java index 8fbba79c8ce..fe439c83ebd 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java @@ -42,6 +42,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -60,6 +62,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -221,6 +224,9 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -301,6 +307,12 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -344,6 +356,8 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java index a27f71cc7cd..ebca3fd68f7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java @@ -42,6 +42,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedEle import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
@@ -60,6 +62,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
@@ -221,6 +224,9 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
return null;
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
return null;
}
@@ -301,6 +307,12 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP }
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
}
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
return null;
}
@@ -344,6 +356,8 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
}
return super.getReorientReferenceRelationshipCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java index 146f4487076..f55ca5402d6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java @@ -497,6 +497,21 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { /**
* @generated
*/
+ public boolean canCreateConstraintContext_8500(Constraint source, Namespace target) {
+ if(source != null) {
+ if(source.getContext() != null) {
+ return false;
+ }
+ }
+ if(target != null && (target.getOwnedRules().contains(target))) {
+ return false;
+ }
+ return canExistConstraintContext_8500(source, target);
+ }
+
+ /**
+ * @generated
+ */
public boolean canExistExtension_1013(Package container, Extension linkInstance, Property source, Class target) {
try {
//ExtensionSource
@@ -734,5 +749,12 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
+
+ /**
+ * @generated
+ */
+ public boolean canExistConstraintContext_8500(Constraint source, Namespace target) {
+ return true;
+ }
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java index 7f89023658e..30a17aa2d61 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java @@ -24,7 +24,7 @@ public class UMLNavigatorSorter extends ViewerSorter { /**
* @generated
*/
- private static final int GROUP_CATEGORY = 4021;
+ private static final int GROUP_CATEGORY = 8502;
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java index e03c5d64d39..caf29fc1372 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java @@ -436,6 +436,16 @@ public class Messages extends NLS { /**
* @generated
*/
+ public static String createContextLink6CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String createContextLink6CreationTool_desc;
+
+ /**
+ * @generated
+ */
public static String createProperty1CreationTool_title;
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java index b04c93d1dda..f6f1fa89c81 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java @@ -37,6 +37,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN; import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPart;
@@ -1199,6 +1200,7 @@ public class UMLDiagramUpdater { Constraint modelElement = (Constraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500(modelElement));
return result;
}
@@ -1443,6 +1445,7 @@ public class UMLDiagramUpdater { Constraint modelElement = (Constraint)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500(modelElement));
return result;
}
@@ -1578,6 +1581,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1597,6 +1601,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1616,6 +1621,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1659,6 +1665,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_PackageImport_1065(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1676,6 +1683,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_PackageImport_1065(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1692,6 +1700,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_PackageImport_1065(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1710,6 +1719,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1728,6 +1738,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1746,6 +1757,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1771,6 +1783,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1825,6 +1838,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1844,6 +1858,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1872,6 +1887,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_PackageImport_1065(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1889,6 +1905,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_PackageImport_1065(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1905,6 +1922,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_PackageImport_1065(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1938,6 +1956,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1956,6 +1975,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1974,6 +1994,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -1992,6 +2013,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -2022,6 +2044,7 @@ public class UMLDiagramUpdater { result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferences));
result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferences));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferences));
return result;
}
@@ -2169,6 +2192,7 @@ public class UMLDiagramUpdater { result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4008(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4018(modelElement));
result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500(modelElement));
return result;
}
@@ -2413,6 +2437,7 @@ public class UMLDiagramUpdater { result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4008(modelElement));
result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4018(modelElement));
result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500(modelElement));
return result;
}
@@ -3020,6 +3045,20 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ private static Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_Context_8500(Namespace target, Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferences.get(target);
+ for(EStructuralFeature.Setting setting : settings) {
+ if(setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_Context()) {
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.ConstraintContext_8500, ContextLinkEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
private static Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Association_4001(Type source) {
Package container = null;
// Find container element for the link.
@@ -3338,6 +3377,19 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ private static Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_Context_8500(Constraint source) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Namespace destination = source.getContext();
+ if(destination == null) {
+ return result;
+ }
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.ConstraintContext_8500, ContextLinkEditPart.VISUAL_ID));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static final DiagramUpdater TYPED_INSTANCE = new DiagramUpdater() {
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java index 70eced7ba06..d212926fae9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java @@ -101,6 +101,11 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
+ private final static String CREATECONTEXTLINK6CREATIONTOOL = "createContextLink6CreationTool"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
private final static String CREATEPROPERTY1CREATIONTOOL = "createProperty1CreationTool"; //$NON-NLS-1$
/**
@@ -165,6 +170,9 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { if(toolId.equals(CREATEASSOCIATION5CREATIONTOOL)) {
return createAssociation5CreationTool();
}
+ if(toolId.equals(CREATECONTEXTLINK6CREATIONTOOL)) {
+ return createContextLink6CreationTool();
+ }
if(toolId.equals(CREATEPROPERTY1CREATIONTOOL)) {
return createProperty1CreationTool();
}
@@ -339,6 +347,16 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
+ private Tool createContextLink6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
private Tool createProperty1CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Property_3002);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java index b52160bce17..0fe64ab16ad 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java @@ -44,13 +44,13 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer AssociationNodePreferencePage.initDefaults(store);
MetaclassPreferencePage.initDefaults(store);
AssociationBranchPreferencePage.initDefaults(store);
- PackageImportPreferencePage.initDefaults(store);
- ExtensionPreferencePage.initDefaults(store);
AssociationPreferencePage.initDefaults(store);
GeneralizationPreferencePage.initDefaults(store);
ElementImportPreferencePage.initDefaults(store);
- ProfileApplicationPreferencePage.initDefaults(store);
DependencyPreferencePage.initDefaults(store);
+ PackageImportPreferencePage.initDefaults(store);
+ ExtensionPreferencePage.initDefaults(store);
+ ProfileApplicationPreferencePage.initDefaults(store);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java index 827c74caa3f..adc7237d7bc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java @@ -37,6 +37,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN; import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationEditPart;
@@ -299,6 +300,11 @@ public class UMLElementTypes { /**
* @generated
*/
+ public static final IElementType ConstraintContext_8500 = getElementType("org.eclipse.papyrus.uml.diagram.profile.ConstraintContext_8500"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static ImageDescriptor getImageDescriptor(ENamedElement element) {
return elementTypeImages.getImageDescriptor(element);
}
@@ -373,6 +379,7 @@ public class UMLElementTypes { elements.put(PackageImport_1065, UMLPackage.eINSTANCE.getPackageImport());
elements.put(CommentAnnotatedElement_1022, UMLPackage.eINSTANCE.getComment_AnnotatedElement());
elements.put(ConstraintConstrainedElement_4014, UMLPackage.eINSTANCE.getConstraint_ConstrainedElement());
+ elements.put(ConstraintContext_8500, UMLPackage.eINSTANCE.getConstraint_Context());
}
return (ENamedElement)elements.get(type);
}
@@ -430,6 +437,7 @@ public class UMLElementTypes { KNOWN_ELEMENT_TYPES.add(PackageImport_1065);
KNOWN_ELEMENT_TYPES.add(CommentAnnotatedElement_1022);
KNOWN_ELEMENT_TYPES.add(ConstraintConstrainedElement_4014);
+ KNOWN_ELEMENT_TYPES.add(ConstraintContext_8500);
}
return KNOWN_ELEMENT_TYPES.contains(elementType);
}
@@ -519,6 +527,8 @@ public class UMLElementTypes { return CommentAnnotatedElement_1022;
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return ConstraintConstrainedElement_4014;
+ case ContextLinkEditPart.VISUAL_ID:
+ return ConstraintContext_8500;
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java index 5cabe25d753..ca0f370af07 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java @@ -83,6 +83,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPart; import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintNameEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPart;
@@ -448,6 +449,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { return createCommentAnnotatedElement_1022(containerView, index, persisted, preferencesHint);
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return createConstraintConstrainedElement_4014(containerView, index, persisted, preferencesHint);
+ case ContextLinkEditPart.VISUAL_ID:
+ return createConstraintContext_8500(containerView, index, persisted, preferencesHint);
}
// can never happen, provided #provides(CreateEdgeViewOperation) is correct
return null;
@@ -1367,6 +1370,33 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { /**
* @generated
*/
+ public Edge createConstraintContext_8500(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ContextLinkEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
+ //org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
+ //if (routing != null) {
+ // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ //}
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
protected void stampShortcut(View containerView, Node target) {
if(!ProfileDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
|