diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PropertyForComponentItemSemanticEditPolicy.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PropertyForComponentItemSemanticEditPolicy.java | 101 |
1 files changed, 51 insertions, 50 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PropertyForComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PropertyForComponentItemSemanticEditPolicy.java index 2df39181b0c..cb6ec98ab3e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PropertyForComponentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PropertyForComponentItemSemanticEditPolicy.java @@ -1,50 +1,51 @@ -/** - * Copyright (c) 2014 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.clazz.edit.policies; - -import org.eclipse.emf.ecore.EObject; -import org.eclipse.gef.commands.Command; -import org.eclipse.gef.commands.UnexecutableCommand; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy; -import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; -import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; -import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; -import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes; - -/** - * @generated - */ -public class PropertyForComponentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy { - /** - * @generated - */ - public PropertyForComponentItemSemanticEditPolicy() { - super(UMLElementTypes.Property_3002); - } - - /** - * @generated - */ - protected Command getDestroyElementCommand(DestroyElementRequest req) { - EObject selectedEObject = req.getElementToDestroy(); - IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject); - if (provider != null) { - // Retrieve delete command from the Element Edit service - ICommand deleteCommand = provider.getEditCommand(req); - if (deleteCommand != null) { - return new ICommandProxy(deleteCommand); - } - } - return UnexecutableCommand.INSTANCE; - } -} +/**
+ * Copyright (c) 2014 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.clazz.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class PropertyForComponentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public PropertyForComponentItemSemanticEditPolicy() {
+ super(UMLElementTypes.Property_3002);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if(provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+ if(deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
|