diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/CreateClassDiagramCommand.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/CreateClassDiagramCommand.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/CreateClassDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/CreateClassDiagramCommand.java new file mode 100644 index 00000000000..a38bdb5beb6 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/CreateClassDiagramCommand.java @@ -0,0 +1,51 @@ +/***************************************************************************** + * Copyright (c) 2008 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: + * Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation + * Obeo + * + *****************************************************************************/ +package org.eclipse.papyrus.diagram.clazz; + +import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; +import org.eclipse.papyrus.core.adaptor.gmf.AbstractPapyrusGmfCreateDiagramCommandHandler; +import org.eclipse.papyrus.diagram.clazz.edit.parts.ModelEditPart; + +/** + * Define a command to create a new Class Diagram. This command is used by all UI (toolbar, outline, + * creation wizards) to create a new Class Diagram. + * + * @author dumoulin + * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a> + */ +public class CreateClassDiagramCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler { + + @Override + protected String getDefaultDiagramName() { + return "ClassDiagram"; + } + + /** + * {@inheritDoc} + */ + @Override + protected String getDiagramNotationID() { + return ModelEditPart.MODEL_ID; + } + + /** + * {@inheritDoc} + */ + @Override + protected PreferencesHint getPreferenceHint() { + return org.eclipse.papyrus.diagram.clazz.part.UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT; + } + +} |