Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/DuplicateTableHandler.java')
-rw-r--r--sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/DuplicateTableHandler.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/DuplicateTableHandler.java b/sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/DuplicateTableHandler.java
deleted file mode 100644
index 4ceb296af8a..00000000000
--- a/sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/DuplicateTableHandler.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 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:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.table.modelexplorer.handlers;
-
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.command.UnexecutableCommand;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr;
-import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
-import org.eclipse.papyrus.infra.table.modelexplorer.messages.Messages;
-
-/**
- * This handler provides the duplicate action for the tables
- * @deprecated Papyrus changes its table metamodel. This class is used to managed the old table metamodel.
- * for details see : 371616: [Table Editor] Tabular Editor should be rewritten to use the new EMF-Facet Metamodels
- *
- *
- */
-@Deprecated
-public class DuplicateTableHandler extends AbstractTableModelExplorerHandler {
-
- /**
- *
- * @see org.eclipse.papyrus.views.modelexplorer.handler.AbstractCommandHandler#getCommand()
- *
- * @return
- */
- @Override
- protected Command getCommand() {
- TransactionalEditingDomain editingDomain = getEditingDomain();
- final IPageMngr pageManager = getPageManager();
- List<PapyrusTableInstance> tables = getSelectedTables();
-
- if(editingDomain != null && pageManager != null && !tables.isEmpty()) {
- CompoundCommand command = new CompoundCommand();
- for(PapyrusTableInstance table : tables) {
-
- // Clone the current table
- final PapyrusTableInstance newTable = EcoreUtil.copy(table);
-
- // Give a new name
- newTable.setName(Messages.DuplicateTableHandler_CopyOf + newTable.getName());
-
- //we duplicate parameters and rename the new table!
-
-
- Command addGmfDiagramCmd = new AddCommand(editingDomain, table.eResource().getContents(), newTable);
- // EMFCommandOperation operation = new EMFCommandOperation(editingDomain, addGmfDiagramCmd);
-
- Command sashOpenCmd = new RecordingCommand(editingDomain) {
-
- @Override
- protected void doExecute() {
- pageManager.openPage(newTable);
- }
- };
- //
- // // TODO : synchronize with Cedric
- // command.append(operation.getCommand());
- command.append(addGmfDiagramCmd);
- command.append(sashOpenCmd);
- }
- return command.isEmpty() ? UnexecutableCommand.INSTANCE : command;
- }
- return UnexecutableCommand.INSTANCE;
- }
-}

Back to the top