diff options
Diffstat (limited to 'sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java')
-rw-r--r-- | sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java deleted file mode 100644 index a4d5f0c9d1d..00000000000 --- a/sandbox/pasteInNewTable/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/providers/EMFEnumeratorContentProvider.java +++ /dev/null @@ -1,57 +0,0 @@ -/*****************************************************************************
- * Copyright (c) 2010 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.emf.providers;
-
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
-
-/**
- * An IStaticContentProvider for EMF enumerators.
- *
- * @author Camille Letavernier
- */
-public class EMFEnumeratorContentProvider extends AbstractStaticContentProvider {
-
- /**
- * The feature representing the Enumerator for this ContentProvider
- */
- protected EStructuralFeature feature;
-
- /**
- * Constructs an EcoreEnumerator for the given Structural Feature
- *
- * @param feature
- */
- public EMFEnumeratorContentProvider(EStructuralFeature feature) {
- this.feature = feature;
- }
-
- public Object[] getElements() {
- EClassifier type = feature.getEType();
- EEnum enumerated = (EEnum)type;
- EEnumLiteral[] literals = enumerated.getELiterals().toArray(new EEnumLiteral[0]);
- Enumerator[] values = new Enumerator[literals.length];
-
- int i = 0;
- for(EEnumLiteral literal : literals) {
- Enumerator value = literal.getInstance();
- values[i++] = value;
- }
-
- return values;
- }
-
-}
|