diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java | 106 |
1 files changed, 55 insertions, 51 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java index 98b4ad0a95a..36c6c0ae486 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java @@ -1,51 +1,55 @@ -/*****************************************************************************
- * Copyright (c) 2010, 2013 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards.command;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-
-/**
- * The Command to create a new Papyrus Model.
- */
-public class NewPapyrusModelCommand extends RecordingCommand {
-
- /** The my model set. */
- private final ModelSet myModelSet;
-
- /** The URI of the model to create. */
- private final URI myURI;
-
- /**
- * Instantiates a new new papyrus model command.
- *
- * @param modelSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- */
- public NewPapyrusModelCommand(ModelSet modelSet, URI newURI) {
- super(modelSet.getTransactionalEditingDomain());
- myModelSet = modelSet;
- myURI = newURI;
- }
-
- @Override
- protected void doExecute() {
- myModelSet.createModels(myURI);
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2010, 2013 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: + * Tatiana Fesenko (CEA LIST) - Initial API and implementation + * Christian W. Damus (CEA) - Support creating models in repositories (CDO) + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.diagram.wizards.command; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.papyrus.infra.core.resource.ModelSet; + +/** + * The Command to create a new Papyrus Model. + */ +public class NewPapyrusModelCommand extends RecordingCommand { + + /** The my model set. */ + private final ModelSet myModelSet; + + /** The URI of the model to create. */ + private final URI myURI; + + /** + * Instantiates a new new papyrus model command. + * + * @param modelSet + * the di resource set + * @param newURI + * the URI of the new model's principal resource + * @param contextId + * the id of the architecture context + * @param viewpointIds + * the ids of the architecture viewpoints + */ + public NewPapyrusModelCommand(ModelSet modelSet, URI newURI) { + super(modelSet.getTransactionalEditingDomain()); + myModelSet = modelSet; + myURI = newURI; + } + + @Override + protected void doExecute() { + myModelSet.createModels(myURI); + } + +} |