Bug 513476: [BPMN] create diagram command
  merge from papyrus/streams/2.0-maintenance 84a8d481 and architecture
  framework integration

Change-Id: I7bbd7b105129f21fd654c1e1783eb1ce21ac4cfb
Signed-off-by: Géry Deloge <gery.deloge@cea.fr>
diff --git a/org.eclipse.papyrus.bpmn.architecture/META-INF/MANIFEST.MF b/org.eclipse.papyrus.bpmn.architecture/META-INF/MANIFEST.MF
index 2dbf791..933be7b 100644
--- a/org.eclipse.papyrus.bpmn.architecture/META-INF/MANIFEST.MF
+++ b/org.eclipse.papyrus.bpmn.architecture/META-INF/MANIFEST.MF
@@ -10,3 +10,4 @@
  org.eclipse.papyrus.infra.architecture
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.bpmn.architecture
diff --git a/org.eclipse.papyrus.bpmn.architecture/src/org/eclipse/papyrus/bpmn/architecture/BpmnRepresentationKinds.java b/org.eclipse.papyrus.bpmn.architecture/src/org/eclipse/papyrus/bpmn/architecture/BpmnRepresentationKinds.java
new file mode 100644
index 0000000..bcb1991
--- /dev/null
+++ b/org.eclipse.papyrus.bpmn.architecture/src/org/eclipse/papyrus/bpmn/architecture/BpmnRepresentationKinds.java
@@ -0,0 +1,27 @@
+package org.eclipse.papyrus.bpmn.architecture; /*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ * 
+ * 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
+ *   
+ *****************************************************************************/
+
+
+public final class BpmnRepresentationKinds {
+	
+	/*
+	 * These ID are the same than those defined in viewpoints/bpmn.configuration
+	 * 
+	 */
+	public static final String COLLABORATION_ID = "org.eclipse.papyrus.bpmn.diagram.collaboration";
+	public static final String PROCESS_ID = "org.eclipse.papyrus.bpmn.diagram.process";
+	
+	private BpmnRepresentationKinds(){
+	}
+
+}
diff --git a/org.eclipse.papyrus.bpmn.diagram.common/src/org/eclipse/papyrus/bpmn/diagram/common/commands/CreateBpmnDiagramCommand.java b/org.eclipse.papyrus.bpmn.diagram.common/src/org/eclipse/papyrus/bpmn/diagram/common/commands/CreateBpmnDiagramCommand.java
new file mode 100644
index 0000000..2e494ab
--- /dev/null
+++ b/org.eclipse.papyrus.bpmn.diagram.common/src/org/eclipse/papyrus/bpmn/diagram/common/commands/CreateBpmnDiagramCommand.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA.
+ * <p>
+ * 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
+ * <p>
+ * Contributors:
+ * Géry Deloge (CEATech AQUI) gery.deloge@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.bpmn.diagram.common.commands;
+
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.common.commands.CreateBehavioredClassifierDiagramCommand;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class CreateBpmnDiagramCommand extends CreateBehavioredClassifierDiagramCommand {
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	protected String getDiagramNotationID() {
+		return ActivityDiagramEditPart.MODEL_ID;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	protected PreferencesHint getPreferenceHint() {
+		return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
+	}
+
+	@Override
+	protected EClass getBehaviorEClass() {
+		return UMLPackage.eINSTANCE.getActivity();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	protected String getDefaultDiagramName() {
+		return "BpmnDiagram"; //$NON-NLS-1$
+	}
+}