/***************************************************************************** * Copyright (c) 2009 Atos Origin. * * * 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: * Atos Origin - Initial API and implementation * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.sequence; import org.eclipse.emf.ecore.EClass; import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; import org.eclipse.papyrus.uml.diagram.common.commands.CreateBehavioredClassifierDiagramCommand; import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.PackageEditPart; import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin; import org.eclipse.uml2.uml.UMLPackage; /** * Define a command to create a new Sequence Diagram. This command is used by all UI (toolbar, * outline, creation wizards) to create a new Sequence Diagram. */ public class CreateSequenceDiagramCommand extends CreateBehavioredClassifierDiagramCommand { /** * {@inheritDoc} */ @Override protected String getDiagramNotationID() { return PackageEditPart.MODEL_ID; } /** * {@inheritDoc} */ @Override protected PreferencesHint getPreferenceHint() { return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT; } /** * {@inheritDoc} */ @Override protected String getDefaultDiagramName() { return "SeqDiagram"; //$NON-NLS-1$ } @Override protected EClass getBehaviorEClass() { return UMLPackage.eINSTANCE.getInteraction(); } }