Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2014-11-06 10:44:24 -0500
committerAnsgar Radermacher2014-11-06 11:00:31 -0500
commit944329e6fcd639cc3905b9febf907861dbce96bb (patch)
tree49fae53ea669a2c94706cebaa8c8de34d4156aae /examples/uml
parentd3603f98fc66b59b7991839b4a472097e3030aca (diff)
downloadorg.eclipse.papyrus-944329e6fcd639cc3905b9febf907861dbce96bb.tar.gz
org.eclipse.papyrus-944329e6fcd639cc3905b9febf907861dbce96bb.tar.xz
org.eclipse.papyrus-944329e6fcd639cc3905b9febf907861dbce96bb.zip
450233 - [C++ codegen] CmdHandler should be moved from "acceleo.ui"
Conflicts: extraplugins/codegen/org.eclipse.papyrus.acceleo.debug/META-INF/MANIFEST.MF extraplugins/codegen/org.eclipse.papyrus.acceleo.ui/META-INF/MANIFEST.MF extraplugins/codegen/org.eclipse.papyrus.cpp.codegen.ui/META-INF/MANIFEST.MF extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/META-INF/MANIFEST.MF
Diffstat (limited to 'examples/uml')
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/META-INF/MANIFEST.MF3
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CmdHandler.java46
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateCompositeDiagramElementsHandler.java1
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateSequenceDiagramElementsHandler.java1
4 files changed, 4 insertions, 47 deletions
diff --git a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/META-INF/MANIFEST.MF b/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/META-INF/MANIFEST.MF
index 5a43b70a8e8..19c7428f196 100644
--- a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/META-INF/MANIFEST.MF
+++ b/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/META-INF/MANIFEST.MF
@@ -12,6 +12,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.uml2.uml;bundle-version="4.1.0",
org.eclipse.gmf.runtime.notation;bundle-version="1.7.0",
org.eclipse.gmf.runtime.diagram.core;bundle-version="1.7.0",
- org.eclipse.papyrus.infra.core;bundle-version="0.10.0"
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
+ org.eclipse.papyrus.uml.diagram.common
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CmdHandler.java b/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CmdHandler.java
deleted file mode 100644
index 4c7b467b7cf..00000000000
--- a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CmdHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * 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:
- * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.example.programmaticcreation;
-
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Superclass for handlers. It converts a selection into an EObject
- */
-public abstract class CmdHandler extends AbstractHandler {
-
- /**
- * Convert selected elements within model explorer or diagram to an eObject
- */
- public void updateSelectedEObject() {
- // Retrieve selected elements
- IStructuredSelection selection = (IStructuredSelection)PlatformUI
- .getWorkbench().getActiveWorkbenchWindow()
- .getSelectionService().getSelection();
-
- if(selection != null) {
- selectedEObject = EMFHelper.getEObject(selection.getFirstElement());
- }
- }
-
- /**
- * Store the selected EObject. Accessible for subclasses
- */
- protected EObject selectedEObject;
-}
diff --git a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateCompositeDiagramElementsHandler.java b/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateCompositeDiagramElementsHandler.java
index 3a3fb8cdb92..a3a882f47f2 100644
--- a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateCompositeDiagramElementsHandler.java
+++ b/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateCompositeDiagramElementsHandler.java
@@ -16,6 +16,7 @@ import org.eclipse.core.commands.operations.OperationHistoryFactory;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.AbstractEMFOperation;
+import org.eclipse.papyrus.uml.diagram.common.handlers.CmdHandler;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.NamedElement;
diff --git a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateSequenceDiagramElementsHandler.java b/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateSequenceDiagramElementsHandler.java
index 46229462f98..c9d5340a212 100644
--- a/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateSequenceDiagramElementsHandler.java
+++ b/examples/uml/org.eclipse.papyrus.uml.diagram.example.programmaticcreation/src/org/eclipse/papyrus/uml/diagram/example/programmaticcreation/CreateSequenceDiagramElementsHandler.java
@@ -16,6 +16,7 @@ import org.eclipse.core.commands.operations.OperationHistoryFactory;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.AbstractEMFOperation;
+import org.eclipse.papyrus.uml.diagram.common.handlers.CmdHandler;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.NamedElement;

Back to the top