Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/actions/MoDiscoCutAction.java')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/actions/MoDiscoCutAction.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/actions/MoDiscoCutAction.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/actions/MoDiscoCutAction.java
new file mode 100644
index 00000000000..e28d70c4904
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/actions/MoDiscoCutAction.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.customization.properties.editor.actions;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.CutAction;
+import org.eclipse.papyrus.customization.properties.util.ActionUtil;
+
+/**
+ * An adapter for the EMF "Cut" Action, compatible with the
+ * MoDisco customizable content provider.
+ *
+ * @author Camille Letavernier
+ */
+public class MoDiscoCutAction extends CutAction {
+
+ /**
+ * Constructor.
+ */
+ public MoDiscoCutAction() {
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * The Editing domain on which the command will be executed
+ */
+ public MoDiscoCutAction(EditingDomain domain) {
+ super(domain);
+ }
+
+ @Override
+ public Command createCommand(Collection<?> selection) {
+ Collection<?> newSelection = ActionUtil.getAdaptedSelection(selection);
+ return super.createCommand(newSelection);
+ }
+
+
+}

Back to the top