Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-12-01 18:00:33 +0000
committerGerrit Code Review @ Eclipse.org2016-12-02 08:27:10 +0000
commit1fc46b0b9dff091996ad4c10fbd222edb943079d (patch)
treeed1a3a65d2148c25ce670696f7093c8e11b03123 /plugins/infra/nattable
parent74c7df186e295d71f2b1896457472852b7e874bc (diff)
downloadorg.eclipse.papyrus-1fc46b0b9dff091996ad4c10fbd222edb943079d.tar.gz
org.eclipse.papyrus-1fc46b0b9dff091996ad4c10fbd222edb943079d.tar.xz
org.eclipse.papyrus-1fc46b0b9dff091996ad4c10fbd222edb943079d.zip
Bug 496905: [Diagram][ModelExplorer][Table][Dialog] Papyrus must
integrate the internationalization feature provided by UML. https://bugs.eclipse.org/bugs/show_bug.cgi?id=496905 Fix TableLabelProvider problem detected by the TableLabelProviderTest after the internationalization merge commit. Change-Id: I3347d48ecfdbb1f99fc3aba15941b5c9b40db591 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
Diffstat (limited to 'plugins/infra/nattable')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java
index 00e72f39c5f..dcb931720fa 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableLabelProvider.java
@@ -59,19 +59,15 @@ public class TableLabelProvider extends ViewPrototypeLabelProvider implements IF
/**
* {@inheritDoc}
*
- * @see org.eclipse.papyrus.infra.ui.emf.providers.EMFLabelProvider#getText(java.lang.Object)
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototypeLabelProvider#getName(org.eclipse.emf.ecore.EObject)
*/
@Override
- public String getText(Object element) {
- String result = null;
-
- // return the internationalization of the table if this is the case
- EObject eObject = EMFHelper.getEObject(element);
- if (eObject instanceof Table) {
- result = LabelInternationalization.getInstance().getTableLabel((Table) eObject);
+ protected String getName(final EObject object) {
+ String value = null;
+ if(object instanceof Table){
+ value = LabelInternationalization.getInstance().getTableLabel((Table)object);
}
-
- return null != result ? result : super.getText(element);
+ return null != value ? value : super.getName(object);
}
@Override

Back to the top