Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/AbstractPapyrusTableModelExplorerHandler.java')
-rw-r--r--sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/AbstractPapyrusTableModelExplorerHandler.java59
1 files changed, 0 insertions, 59 deletions
diff --git a/sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/AbstractPapyrusTableModelExplorerHandler.java b/sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/AbstractPapyrusTableModelExplorerHandler.java
deleted file mode 100644
index 78cc7b4b285..00000000000
--- a/sandbox/org.eclipse.papyrus.infra.table.modelexplorer/src/org/eclipse/papyrus/infra/table/modelexplorer/handlers/AbstractPapyrusTableModelExplorerHandler.java
+++ /dev/null
@@ -1,59 +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.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.table.metamodel.papyrustable.PapyrusTable;
-import org.eclipse.papyrus.views.modelexplorer.handler.AbstractCommandHandler;
-import org.eclipse.ui.PlatformUI;
-
-public abstract class AbstractPapyrusTableModelExplorerHandler extends AbstractCommandHandler {
-
- /**
- * Returns the list of selected tables
- *
- * @return the list of selected tables
- */
- protected List<PapyrusTable> getSelectedTables() {
- List<PapyrusTable> tables = new ArrayList<PapyrusTable>();
- ISelection selection = null;
-
- // Get current selection
- selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
-
- // Get first element if the selection is an IStructuredSelection
- if(selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection)selection;
- Iterator<?> iter = structuredSelection.iterator();
- while(iter.hasNext()) {
- Object current = iter.next();
- if(current instanceof IAdaptable) {
- EObject table = (EObject)((IAdaptable)current).getAdapter(EObject.class);
- if(table instanceof PapyrusTable) {
- tables.add((PapyrusTable)table);
- }
- }
- }
- }
- return tables;
- }
-
-}

Back to the top