diff options
author | Thanh Liem PHAN | 2017-05-29 14:26:16 +0000 |
---|---|---|
committer | Nicolas FAUVERGUE | 2017-05-29 14:56:35 +0000 |
commit | cc677b9920abdda9590d432b713c7fed5f429079 (patch) | |
tree | 670b99da6b9183e9ede879baa5b68231ddbabf82 /plugins/uml/nattable | |
parent | 9ffa326083e3e13093dbdfcecc39080af98cd036 (diff) | |
download | org.eclipse.papyrus-cc677b9920abdda9590d432b713c7fed5f429079.tar.gz org.eclipse.papyrus-cc677b9920abdda9590d432b713c7fed5f429079.tar.xz org.eclipse.papyrus-cc677b9920abdda9590d432b713c7fed5f429079.zip |
Bug 517374: [Table][Cell Editor] UML reference cell editors are not
correctly handled
https://bugs.eclipse.org/bugs/show_bug.cgi?id=517374
- Correct the handles condition in the UML reference cell editor
configurations.
Change-Id: I5de3b239afb107028f20fd32405850e0571e635b
Signed-off-by: Thanh Liem PHAN <thanhliem.phan@all4tec.net>
Diffstat (limited to 'plugins/uml/nattable')
2 files changed, 16 insertions, 22 deletions
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/MultiUMLReferenceCellEditorConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/MultiUMLReferenceCellEditorConfiguration.java index c0740d766e7..642f2249a48 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/MultiUMLReferenceCellEditorConfiguration.java +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/MultiUMLReferenceCellEditorConfiguration.java @@ -1,6 +1,6 @@ /***************************************************************************** - * Copyright (c) 2015 CEA LIST and others. - * + * Copyright (c) 2015, 2017 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 @@ -8,13 +8,12 @@ * * Contributors: * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation - * + * Thanh Liem PHAN (ALL4TEC) thanhliem.phan@all4tec.net - Bug 517374 *****************************************************************************/ package org.eclipse.papyrus.uml.nattable.config; import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes; import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry; @@ -43,7 +42,7 @@ public class MultiUMLReferenceCellEditorConfiguration implements ICellAxisConfig /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.configuration.IPapyrusNatTableConfiguration#getConfigurationId() */ @Override @@ -53,7 +52,7 @@ public class MultiUMLReferenceCellEditorConfiguration implements ICellAxisConfig /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.configuration.IPapyrusNatTableConfiguration#getConfigurationDescription() */ @Override @@ -63,7 +62,7 @@ public class MultiUMLReferenceCellEditorConfiguration implements ICellAxisConfig /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) */ @Override @@ -74,9 +73,7 @@ public class MultiUMLReferenceCellEditorConfiguration implements ICellAxisConfig EStructuralFeature feature = (EStructuralFeature) object; if (feature.isMany()) { EClassifier etype = feature.getEType(); - if (etype instanceof EDataType) { - result = EMFHelper.isSuperType(UMLPackage.eINSTANCE.getElement(), etype); - } + result = EMFHelper.isSuperType(UMLPackage.eINSTANCE.getElement(), etype); } } return result; @@ -84,7 +81,7 @@ public class MultiUMLReferenceCellEditorConfiguration implements ICellAxisConfig /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration#configureCellEditor(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry, java.lang.Object, java.lang.String) */ @Override diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/SingleUMLReferenceCellEditorConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/SingleUMLReferenceCellEditorConfiguration.java index 8bf1cc66dd2..c5fa7794aa3 100644 --- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/SingleUMLReferenceCellEditorConfiguration.java +++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/SingleUMLReferenceCellEditorConfiguration.java @@ -1,6 +1,6 @@ /***************************************************************************** - * Copyright (c) 2015 CEA LIST and others. - * + * Copyright (c) 2015, 2017 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 @@ -8,13 +8,12 @@ * * Contributors: * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation - * + * Thanh Liem PHAN (ALL4TEC) thanhliem.phan@all4tec.net - Bug 517374 *****************************************************************************/ package org.eclipse.papyrus.uml.nattable.config; import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes; import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry; @@ -44,7 +43,7 @@ public class SingleUMLReferenceCellEditorConfiguration implements ICellAxisConfi /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.configuration.IPapyrusNatTableConfiguration#getConfigurationId() */ @Override @@ -54,7 +53,7 @@ public class SingleUMLReferenceCellEditorConfiguration implements ICellAxisConfi /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.configuration.IPapyrusNatTableConfiguration#getConfigurationDescription() */ @Override @@ -64,7 +63,7 @@ public class SingleUMLReferenceCellEditorConfiguration implements ICellAxisConfi /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object) */ @Override @@ -75,9 +74,7 @@ public class SingleUMLReferenceCellEditorConfiguration implements ICellAxisConfi EStructuralFeature feature = (EStructuralFeature) object; if (!feature.isMany()) { EClassifier etype = feature.getEType(); - if (etype instanceof EDataType) { - result = EMFHelper.isSuperType(UMLPackage.eINSTANCE.getElement(), etype); - } + result = EMFHelper.isSuperType(UMLPackage.eINSTANCE.getElement(), etype); } } return result; @@ -85,7 +82,7 @@ public class SingleUMLReferenceCellEditorConfiguration implements ICellAxisConfi /** * {@inheritDoc} - * + * * @see org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration#configureCellEditor(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry, java.lang.Object, java.lang.String) */ @Override |