Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java18
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/dataprovider/EEnumComboBoxDataProvider.java78
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java171
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java16
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java86
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/selection/EObjectSelectionExtractor.java35
6 files changed, 385 insertions, 19 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java
index 5dc8eaf6e99..c76949789b4 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/celleditor/config/EStructuralFeatureEditorConfig.java
@@ -13,13 +13,9 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.emf.nattable.celleditor.config;
-import java.util.ArrayList;
-import java.util.List;
-
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.jface.viewers.ILabelProvider;
@@ -37,6 +33,7 @@ import org.eclipse.nebula.widgets.nattable.painter.cell.ComboBoxPainter;
import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter;
import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.emf.nattable.dataprovider.EEnumComboBoxDataProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.nattable.celleditor.MultiLineTextCellEditorEx;
import org.eclipse.papyrus.infra.nattable.celleditor.config.AbstractCellEditorConfiguration;
@@ -107,18 +104,7 @@ public class EStructuralFeatureEditorConfig extends AbstractCellEditorConfigurat
editor = new CheckBoxCellEditor();
break;
case SINGLE_EENUM_TYPE:
- editor = new ComboBoxCellEditor(new IComboBoxDataProvider() {
-
-
- @Override
- public List<?> getValues(int columnIndex, int rowIndex) {
- final List<Object> literals = new ArrayList<Object>();
- for (final EEnumLiteral instances : ((EEnum) ((EStructuralFeature) axisElement).getEType()).getELiterals()) {
- literals.add(instances.getInstance());
- }
- return literals;
- }
- });
+ editor = new ComboBoxCellEditor(new EEnumComboBoxDataProvider((EEnum) ((EStructuralFeature) axisElement).getEType()));
break;
default:
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/dataprovider/EEnumComboBoxDataProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/dataprovider/EEnumComboBoxDataProvider.java
new file mode 100644
index 00000000000..91976b412fe
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/dataprovider/EEnumComboBoxDataProvider.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.nattable.dataprovider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+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.nebula.widgets.nattable.edit.editor.IComboBoxDataProvider;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+
+/**
+ * @author VL222926
+ *
+ */
+public class EEnumComboBoxDataProvider implements IComboBoxDataProvider {
+
+ /**
+ * the enumeration for which we want the literals
+ */
+ private final EEnum eenum;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param eenum
+ * the enumeration for which we want the literals
+ */
+ public EEnumComboBoxDataProvider(EEnum eenum) {
+ this.eenum = eenum;
+ }
+
+ /**
+ * Constructor.
+ *
+ */
+ public EEnumComboBoxDataProvider(Object axisElement) {
+ Object object = AxisUtils.getRepresentedElement(axisElement);
+ Assert.isTrue(object instanceof EStructuralFeature);
+ EStructuralFeature feature = (EStructuralFeature) object;
+ EClassifier type = feature.getEType();
+ Assert.isTrue(type instanceof EEnum);
+ this.eenum = (EEnum) type;
+ }
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.IComboBoxDataProvider#getValues(int, int)
+ *
+ * @param columnIndex
+ * @param rowIndex
+ * @return
+ */
+ @Override
+ public List<?> getValues(int columnIndex, int rowIndex) {
+ final List<Object> literals = new ArrayList<Object>();
+ for (final EEnumLiteral instances : this.eenum.getELiterals()) {
+ literals.add(instances.getInstance());
+ }
+ return literals;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java
new file mode 100644
index 00000000000..3dbff4c2b7c
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/EObjectTreeAxisManagerForEventList.java
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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.emf.nattable.manager.axis;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.sashwindows.di.PageRef;
+import org.eclipse.papyrus.infra.core.sashwindows.di.Window;
+import org.eclipse.papyrus.infra.nattable.dataprovider.HierarchicalRowLabelHeaderDataProvider;
+import org.eclipse.papyrus.infra.nattable.manager.axis.AbstractTreeAxisManagerForEventList;
+import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManagerForEventList;
+import org.eclipse.papyrus.infra.nattable.manager.axis.ITreeItemAxisManagerForEventList;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.nattable.tree.ITreeItemAxisHelper;
+
+//import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
+
+/**
+ *
+ * @author VL222926
+ * Class used to managed hierarchical axis
+ */
+public class EObjectTreeAxisManagerForEventList extends AbstractTreeAxisManagerForEventList implements IAxisManagerForEventList, ITreeItemAxisManagerForEventList {
+
+
+
+ /**
+ * NOT IN THE API, only here to do the dev about the display of the category (intermediate level displayed filling configuration
+ *
+ */
+ public static final boolean DISPLAY_CATEOGORY = HierarchicalRowLabelHeaderDataProvider.DISPLAY_CATEOGORY;
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#getAddAxisCommand(org.eclipse.emf.transaction.TransactionalEditingDomain, java.util.Collection)
+ *
+ * @param domain
+ * @param objectToAdd
+ * @return
+ */
+ @Override
+ public Command getAddAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToAdd) {
+ final Collection<IAxis> toAdd = new ArrayList<IAxis>();
+ for (final Object object : objectToAdd) {
+ if (isAllowedContents(object, null, null, 0) && !isAlreadyManaged(object)) {
+ final EObjectAxis horizontalAxis = NattableaxisFactory.eINSTANCE.createEObjectTreeItemAxis();
+ horizontalAxis.setElement((EObject) object);
+ horizontalAxis.setManager(this.representedAxisManager);
+ toAdd.add(horizontalAxis);
+ }
+ }
+ if (!toAdd.isEmpty()) {
+ return AddCommand.create(domain, getRepresentedContentProvider(), NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), toAdd);
+ }
+ return null;
+ }
+
+
+
+ /**
+ * @param objectToTest
+ * @param depth
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.ITreeItemAxisManagerForEventList#isAllowedContents(java.lang.Object, Object, TreeFillingConfiguration, int)
+ *
+ * @return
+ */
+ @Override
+ public boolean isAllowedContents(Object objectToTest, Object semanticParent, TreeFillingConfiguration conf, int depth) {
+ if (objectToTest instanceof EObject) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractTreeAxisManagerForEventList#isAllowedContents(java.lang.Object)
+ *
+ * @param object
+ * @return
+ * @deprecated
+ */
+ @Deprecated
+ @Override
+ public boolean isAllowedContents(Object object) {
+ return object instanceof EObject;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractTreeAxisManagerForEventList#createITreeItemAxis(org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis, java.lang.Object)
+ *
+ * @param parentAxis
+ * @param objectToAdd
+ * @return
+ */
+ @Override
+ protected ITreeItemAxis createITreeItemAxis(ITreeItemAxis parentAxis, Object objectToAdd) {
+ return ITreeItemAxisHelper.createITreeItemAxis(getTableEditingDomain(), parentAxis, objectToAdd, this.representedAxisManager);
+ }
+
+
+ /**
+ *
+ * @param notification
+ * a notification
+ * @return
+ * <code>true</code> if the notification must be ignored
+ */
+ @Override
+ protected boolean ignoreEvent(final Notification notification) {
+ boolean res = super.ignoreEvent(notification);
+ if (res) {
+ return res;
+ }
+ Object notifier = notification.getNotifier();
+ Object feature = notification.getFeature();
+ if (feature == null) {
+ return true;
+ }
+ if (notifier instanceof PageRef || notifier instanceof Window) {
+ return true;
+ }
+
+
+ // I am not sure of the end of this method
+ // List<EStructuralFeature> listenFeature = new ArrayList<EStructuralFeature>();
+ // List<TreeFillingConfiguration> confs = FillingConfigurationUtils.getTreeFillingConfiguration(getTable(), representedAxisManager);
+ // boolean derivedFeature = false;
+ // for (TreeFillingConfiguration conf : confs) {
+ // IAxis axis = conf.getAxisUsedAsAxisProvider();
+ // if (axis instanceof EStructuralFeatureAxis) {
+ // EStructuralFeature f = (EStructuralFeature) axis.getElement();
+ // derivedFeature = derivedFeature || f.isDerived();
+ // if (derivedFeature) {
+ // return false;
+ // }
+ // }
+ // }
+ // if (listenFeature.contains(feature)) {
+ // return false;
+ // }
+ //
+ // if (confs.size() == listenFeature.size()) {
+ // return false;
+ // }
+ // return true;
+ return false;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
index 74bed7ab6ff..e695794ae7e 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/EMFFeatureHeaderLabelProvider.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
import org.eclipse.papyrus.infra.emf.nattable.registry.EStructuralFeatureImageRegistry;
+import org.eclipse.papyrus.infra.nattable.Activator;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.FeatureLabelProviderConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
@@ -78,7 +79,7 @@ public class EMFFeatureHeaderLabelProvider extends EMFEObjectHeaderLabelProvider
try {
displayName = featureConf.isDisplayName();
} catch (Exception e) {
- e.printStackTrace();
+ Activator.log.error(e);
}
boolean displayMultiplicity = featureConf.isDisplayMultiplicity();
boolean displayType = featureConf.isDisplayType();
@@ -149,7 +150,7 @@ public class EMFFeatureHeaderLabelProvider extends EMFEObjectHeaderLabelProvider
final ILabelProviderContextElementWrapper wrapper = (ILabelProviderContextElementWrapper) element;
final IConfigRegistry configRegistry = wrapper.getConfigRegistry();
- final Object value = wrapper.getObject();
+ final Object value = getWrappedValue(wrapper);
EStructuralFeature feature = null;
String alias = "";//$NON-NLS-1$
if (value instanceof EStructuralFeatureAxis) {
@@ -196,7 +197,7 @@ public class EMFFeatureHeaderLabelProvider extends EMFEObjectHeaderLabelProvider
return null;
}
- final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ final Object object = getWrappedValue((ILabelProviderContextElementWrapper) element);
EStructuralFeature feature = null;
if (object instanceof EStructuralFeatureAxis) {
feature = ((EStructuralFeatureAxis) object).getElement();
@@ -243,4 +244,13 @@ public class EMFFeatureHeaderLabelProvider extends EMFEObjectHeaderLabelProvider
return EStructuralFeatureImageRegistry.getLinkIcon();
}
+ /**
+ * @param wrapper
+ * @return
+ * the wrapped value to use to calculate the label
+ */
+ protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
+ return wrapper.getObject();
+ }
+
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java
new file mode 100644
index 00000000000..60600a08451
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/provider/TreeFillingFeatureLabelProvider.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.nattable.provider;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.ILabelProviderConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.ILabelProviderContextElementWrapper;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
+
+/**
+ * @author VL222926
+ *
+ */
+public class TreeFillingFeatureLabelProvider extends EMFFeatureHeaderLabelProvider {
+
+ /**
+ * @see org.eclipse.papyrus.infra.emf.nattable.provider.EMFFeatureHeaderLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean accept(Object element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof ITreeItemAxis) {
+ ITreeItemAxis curr = (ITreeItemAxis) object;
+ Object el = curr.getElement();
+ if (el instanceof TreeFillingConfiguration) {
+ final IAxis axis = ((TreeFillingConfiguration) el).getAxisUsedAsAxisProvider();
+ return axis instanceof EStructuralFeature || axis instanceof EStructuralFeatureAxis;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.provider.AbstractNattableCellLabelProvider#getLabelConfiguration(org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ protected ILabelProviderConfiguration getLabelConfiguration(LabelProviderCellContextElementWrapper element) {
+ if (element instanceof ILabelProviderContextElementWrapper) {
+ final Object object = ((ILabelProviderContextElementWrapper) element).getObject();
+ if (object instanceof IAxis && ((IAxis) object).getElement() instanceof TreeFillingConfiguration) {
+ return ((TreeFillingConfiguration) ((IAxis) object).getElement()).getLabelProvider();
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @param wrapper
+ * @return
+ * the wrapped value to use to calculate the label
+ */
+ @Override
+ protected Object getWrappedValue(final ILabelProviderContextElementWrapper wrapper) {
+ Object value = wrapper.getObject();
+ if (value instanceof IAxis && ((IAxis) value).getElement() instanceof TreeFillingConfiguration) {
+ return ((TreeFillingConfiguration) ((IAxis) value).getElement()).getAxisUsedAsAxisProvider();
+ }
+ return super.getWrappedValue(wrapper);
+ }
+
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/selection/EObjectSelectionExtractor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/selection/EObjectSelectionExtractor.java
new file mode 100644
index 00000000000..3170a46576c
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/selection/EObjectSelectionExtractor.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.nattable.selection;
+
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.nattable.selection.ObjectsSelectionExtractor;
+
+/**
+ * @author VL222926
+ *
+ */
+public class EObjectSelectionExtractor extends ObjectsSelectionExtractor {
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.selection.ObjectsSelectionExtractor#getRealObject(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ protected Object getRealObject(Object object) {
+ return EMFHelper.getEObject(object);
+ }
+}

Back to the top