Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tessier2016-08-23 12:11:08 +0000
committerGerrit Code Review @ Eclipse.org2016-08-30 07:09:00 +0000
commit054cc4f68d2cef4d1fb1cb9aaf92a0df6db64f47 (patch)
tree773735b9e14889121424148ae02a792d1a7e2c10 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src
parent00da8629f652e8f9f0597a133a40054378f75764 (diff)
downloadorg.eclipse.papyrus-054cc4f68d2cef4d1fb1cb9aaf92a0df6db64f47.tar.gz
org.eclipse.papyrus-054cc4f68d2cef4d1fb1cb9aaf92a0df6db64f47.tar.xz
org.eclipse.papyrus-054cc4f68d2cef4d1fb1cb9aaf92a0df6db64f47.zip
500119: [Diagram Generation] Generate diagram for the version oxygen
https://bugs.eclipse.org/bugs/show_bug.cgi?id=500119 remove some unused classes Change-Id: Id21033d32155d3132d5142a94f212dede27e7387 Signed-off-by: Patrick Tessier <Patrick.Tessier@cea.fr>
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAggregationPropertyAction.java104
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAssociationPropertyOwnerAction.java104
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetClassifierPropertyOwnerAction.java118
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetCompositePropertyAction.java31
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNavigablePropertyAction.java104
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNonNavigablePropertyAction.java104
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNoneAggregationPropertyAction.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetSharedPropertyAction.java30
8 files changed, 0 insertions, 625 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAggregationPropertyAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAggregationPropertyAction.java
deleted file mode 100644
index d2c998bf00c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAggregationPropertyAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.uml2.uml.AggregationKind;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * set the aggragationKind of the selected associationEnd.
- */
-public class SetAggregationPropertyAction implements IObjectActionDelegate {
-
- /** The selected element. */
- private GraphicalEditPart selectedElement;
-
- /** The feature. */
- protected final EStructuralFeature feature = UMLPackage.eINSTANCE.getProperty_Aggregation();
-
- /** The aggregation kind. */
- protected AggregationKind aggregationKind = null;
-
- /**
- * Instantiates a new sets the aggregation property action.
- */
- public SetAggregationPropertyAction() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- *
- * @param action
- * @param targetPart
- */
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- // TODO Auto-generated method stub
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- *
- * @param action
- */
- @Override
- public void run(IAction action) {
- // 1 this is a associationEnd?
- CompoundCommand command = new CompoundCommand();
- if (selectedElement instanceof AssociationEndSourceEditPart || selectedElement instanceof AssociationEndTargetEditPart || selectedElement instanceof AssociationClassRoleSourceEditPart || selectedElement instanceof AssociationClassRoleTargetEditPart) {
- // 2. look for the future owner of the property, run only for binary association
- Property property = (Property) selectedElement.resolveSemanticElement();
- if (aggregationKind != null) {
- // add property in association
- SetRequest setRequest = new SetRequest(property, feature, aggregationKind);
- SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- command.add(new ICommandProxy(setValueCommand));
- selectedElement.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- *
- * @param action
- * @param selection
- */
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
- if (selectedobject instanceof GraphicalEditPart) {
- selectedElement = (GraphicalEditPart) selectedobject;
- }
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAssociationPropertyOwnerAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAssociationPropertyOwnerAction.java
deleted file mode 100644
index ea2de46c877..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetAssociationPropertyOwnerAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * set the owner of the selected property as a corresponded association.
- */
-public class SetAssociationPropertyOwnerAction implements IObjectActionDelegate {
-
- /** The selected element. */
- private GraphicalEditPart selectedElement;
-
- /**
- * Instantiates a new sets the association property owner action.
- */
- public SetAssociationPropertyOwnerAction() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- *
- * @param action
- * @param targetPart
- */
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- // TODO Auto-generated method stub
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- *
- * @param action
- */
- @Override
- public void run(IAction action) {
- // 1 this is a associationEnd?
- CompoundCommand command = new CompoundCommand();
- if (selectedElement instanceof AssociationEndSourceEditPart || selectedElement instanceof AssociationEndTargetEditPart || selectedElement instanceof AssociationClassRoleSourceEditPart || selectedElement instanceof AssociationClassRoleTargetEditPart) {
- // 2. look for the future owner of the property, run only for binary association
- Property property = (Property) selectedElement.resolveSemanticElement();
- if (property.getAssociation() != null) {
- // add property in association
- EStructuralFeature feature = UMLPackage.eINSTANCE.getAssociation_OwnedEnd();
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(property.getAssociation().getOwnedEnds());
- attributeList.add(property);
- SetRequest setRequest = new SetRequest(property.getAssociation(), feature, attributeList);
- SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- command.add(new ICommandProxy(setValueCommand));
- selectedElement.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- *
- * @param action
- * @param selection
- */
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
- if (selectedobject instanceof GraphicalEditPart) {
- selectedElement = (GraphicalEditPart) selectedobject;
- }
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetClassifierPropertyOwnerAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetClassifierPropertyOwnerAction.java
deleted file mode 100644
index b7e3af50d0e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetClassifierPropertyOwnerAction.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.uml2.uml.Association;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-
-// TODO: Auto-generated Javadoc
-/**
- * set the owner of the selected property as a corresponded classifier.
- */
-public class SetClassifierPropertyOwnerAction implements IObjectActionDelegate {
-
- /** The selected element. */
- private GraphicalEditPart selectedElement;
-
- /**
- * Instantiates a new sets the classifier property owner action.
- */
- public SetClassifierPropertyOwnerAction() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- *
- * @param action
- * @param targetPart
- */
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- // TODO Auto-generated method stub
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- *
- * @param action
- */
- @Override
- public void run(IAction action) {
- // 1 this is a associationEnd?
- CompoundCommand command = new CompoundCommand();
- if (selectedElement instanceof AssociationEndSourceEditPart || selectedElement instanceof AssociationEndTargetEditPart || selectedElement instanceof AssociationClassRoleSourceEditPart || selectedElement instanceof AssociationClassRoleTargetEditPart) {
- Type owner = null;
- // 2. look for the future owner of the property, run only for binary association
- Property property = (Property) selectedElement.resolveSemanticElement();
- if (property.getOwner() instanceof Association) {
- // look for the owner of the property to Set
- Association association = (Association) property.getOwner();
- List<Type> ownerList = association.getEndTypes();
- if (ownerList.get(0).equals(property.getType()) && ownerList.size() > 1) {
- owner = ownerList.get(1);
- } else {
- owner = ownerList.get(0);
- }
- }
- // this is a classifier , construct and run the command
- EStructuralFeature feature = UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute();
- if (owner instanceof org.eclipse.uml2.uml.Class) {
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(((org.eclipse.uml2.uml.Class) owner).getAttributes());
- attributeList.add(property);
- SetRequest setRequest = new SetRequest(owner, feature, attributeList);
- SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- command.add(new ICommandProxy(setValueCommand));
- selectedElement.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- *
- * @param action
- * @param selection
- */
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
- if (selectedobject instanceof GraphicalEditPart) {
- selectedElement = (GraphicalEditPart) selectedobject;
- }
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetCompositePropertyAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetCompositePropertyAction.java
deleted file mode 100644
index 8346364873b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetCompositePropertyAction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import org.eclipse.uml2.uml.AggregationKind;
-
-// TODO: Auto-generated Javadoc
-/**
- * The the association end composite
- */
-public class SetCompositePropertyAction extends SetAggregationPropertyAction {
-
- /**
- * Instantiates a new sets the composite property action.
- */
- public SetCompositePropertyAction() {
- super();
- aggregationKind = AggregationKind.COMPOSITE_LITERAL;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNavigablePropertyAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNavigablePropertyAction.java
deleted file mode 100644
index fa99488018c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNavigablePropertyAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * set the association end navigable
- */
-public class SetNavigablePropertyAction implements IObjectActionDelegate {
-
- /** The selected element. */
- private GraphicalEditPart selectedElement;
-
- /**
- * Instantiates a new sets the navigable property action.
- */
- public SetNavigablePropertyAction() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- *
- * @param action
- * @param targetPart
- */
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- // TODO Auto-generated method stub
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- *
- * @param action
- */
- @Override
- public void run(IAction action) {
- // 1 this is a associationEnd?
- CompoundCommand command = new CompoundCommand();
- if (selectedElement instanceof AssociationEndSourceEditPart || selectedElement instanceof AssociationEndTargetEditPart || selectedElement instanceof AssociationClassRoleSourceEditPart || selectedElement instanceof AssociationClassRoleTargetEditPart) {
- // 2. look for the future owner of the property, run only for binary association
- Property property = (Property) selectedElement.resolveSemanticElement();
- if (property.getAssociation() != null) {
- // add property in association
- EStructuralFeature feature = UMLPackage.eINSTANCE.getAssociation_NavigableOwnedEnd();
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(property.getAssociation().getNavigableOwnedEnds());
- attributeList.add(property);
- SetRequest setRequest = new SetRequest(property.getAssociation(), feature, attributeList);
- SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- command.add(new ICommandProxy(setValueCommand));
- selectedElement.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- *
- * @param action
- * @param selection
- */
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
- if (selectedobject instanceof GraphicalEditPart) {
- selectedElement = (GraphicalEditPart) selectedobject;
- }
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNonNavigablePropertyAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNonNavigablePropertyAction.java
deleted file mode 100644
index e262bab3ac2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNonNavigablePropertyAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * set the assocaition end non naviagable.
- */
-public class SetNonNavigablePropertyAction implements IObjectActionDelegate {
-
- /** The selected element. */
- private GraphicalEditPart selectedElement;
-
- /**
- * Instantiates a new sets the non navigable property action.
- */
- public SetNonNavigablePropertyAction() {
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- *
- * @param action
- * @param targetPart
- */
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- // TODO Auto-generated method stub
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- *
- * @param action
- */
- @Override
- public void run(IAction action) {
- // 1 this is a associationEnd?
- CompoundCommand command = new CompoundCommand();
- if (selectedElement instanceof AssociationEndSourceEditPart || selectedElement instanceof AssociationEndTargetEditPart || selectedElement instanceof AssociationClassRoleSourceEditPart || selectedElement instanceof AssociationClassRoleTargetEditPart) {
- // 2. look for the future owner of the property, run only for binary association
- Property property = (Property) selectedElement.resolveSemanticElement();
- if (property.getAssociation() != null) {
- // add property in association
- EStructuralFeature feature = UMLPackage.eINSTANCE.getAssociation_NavigableOwnedEnd();
- List<Property> attributeList = new ArrayList<Property>();
- attributeList.addAll(property.getAssociation().getNavigableOwnedEnds());
- attributeList.remove(property);
- SetRequest setRequest = new SetRequest(property.getAssociation(), feature, attributeList);
- SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- command.add(new ICommandProxy(setValueCommand));
- selectedElement.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- *
- * @param action
- * @param selection
- */
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- Object selectedobject = ((IStructuredSelection) selection).getFirstElement();
- if (selectedobject instanceof GraphicalEditPart) {
- selectedElement = (GraphicalEditPart) selectedobject;
- }
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNoneAggregationPropertyAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNoneAggregationPropertyAction.java
deleted file mode 100644
index 0439ae3a245..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetNoneAggregationPropertyAction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import org.eclipse.uml2.uml.AggregationKind;
-
-/**
- * Set the association end without aggragation
- */
-public class SetNoneAggregationPropertyAction extends SetAggregationPropertyAction {
-
- /**
- * Instantiates a new sets the none aggregation property action.
- */
- public SetNoneAggregationPropertyAction() {
- super();
- aggregationKind = AggregationKind.NONE_LITERAL;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetSharedPropertyAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetSharedPropertyAction.java
deleted file mode 100644
index 166e7918b48..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/action/SetSharedPropertyAction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.action;
-
-import org.eclipse.uml2.uml.AggregationKind;
-
-/**
- * set the association end shared
- */
-public class SetSharedPropertyAction extends SetAggregationPropertyAction {
-
- /**
- * Instantiates a new sets the shared property action.
- */
- public SetSharedPropertyAction() {
- super();
- aggregationKind = AggregationKind.SHARED_LITERAL;
- }
-}

Back to the top