Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 203448 Details for
Bug 357871
MEEnumControl should respect literal translation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed patch
MEEnumControl.java.patch (text/plain), 1.36 KB, created by
Nikolay Kasyanov
on 2011-09-15 15:44:02 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Nikolay Kasyanov
Created:
2011-09-15 15:44:02 EDT
Size:
1.36 KB
patch
obsolete
>Index: src/org/eclipse/emf/ecp/editor/mecontrols/MEEnumControl.java >=================================================================== >--- src/org/eclipse/emf/ecp/editor/mecontrols/MEEnumControl.java (revision 12274) >+++ src/org/eclipse/emf/ecp/editor/mecontrols/MEEnumControl.java (working copy) >@@ -14,6 +14,7 @@ > import org.eclipse.emf.ecore.EEnum; > import org.eclipse.emf.ecore.EEnumLiteral; > import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.edit.provider.IItemLabelProvider; > import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; > import org.eclipse.jface.databinding.swt.SWTObservables; > import org.eclipse.swt.SWT; >@@ -45,9 +46,11 @@ > this.attribute = (EAttribute) feature; > combo = new Combo(parent, style | SWT.DROP_DOWN | SWT.READ_ONLY); > IObservableValue model = EMFEditObservables.observeValue(getEditingDomain(), getModelElement(), attribute); >+ IItemLabelProvider labelProvider = getItemPropertyDescriptor().getLabelProvider(getModelElement()); > EList<EEnumLiteral> list = ((EEnum) attribute.getEType()).getELiterals(); > for (EEnumLiteral literal : list) { >- combo.add(literal.getLiteral()); >+ final String literalName = labelProvider.getText(literal.getInstance()); >+ combo.add(literalName); > } > EMFDataBindingContext dbc = new EMFDataBindingContext(); > dbc.bindValue(SWTObservables.observeSelection(combo), model, null, null);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
eclipse
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 357871
:
203448
|
203482