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 161110 Details for
Bug 290555
ComboBox property editor fails when using filters
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]
Yet another approach to address strange combo box behavior
290555.patch (text/plain), 1.92 KB, created by
Ed Merks
on 2010-03-05 07:03:31 EST
(
hide
)
Description:
Yet another approach to address strange combo box behavior
Filename:
MIME Type:
Creator:
Ed Merks
Created:
2010-03-05 07:03:31 EST
Size:
1.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.emf.common.ui >Index: src/org/eclipse/emf/common/ui/celleditor/ExtendedComboBoxCellEditor.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf/plugins/org.eclipse.emf.common.ui/src/org/eclipse/emf/common/ui/celleditor/ExtendedComboBoxCellEditor.java,v >retrieving revision 1.8 >diff -u -r1.8 ExtendedComboBoxCellEditor.java >--- src/org/eclipse/emf/common/ui/celleditor/ExtendedComboBoxCellEditor.java 22 Dec 2008 14:26:02 -0000 1.8 >+++ src/org/eclipse/emf/common/ui/celleditor/ExtendedComboBoxCellEditor.java 5 Mar 2010 12:00:15 -0000 >@@ -212,11 +212,26 @@ > CCombo combo = (CCombo)getControl(); > if (combo != null && (!combo.isDisposed())) > { >- String[] items = createItems(list = new ArrayList<Object>(originalList), labelProvider, filter, sorted); >- combo.setItems(items); >- if (items.length > 0) >- { >- combo.select(0); >+ ArrayList<Object> newList = new ArrayList<Object>(originalList); >+ String[] items = createItems(newList, labelProvider, filter, sorted); >+ if (!newList.equals(list)) >+ { >+ final Object previousValue = getValue(); >+ list = newList; >+ combo.setItems(items); >+ if (list.contains(previousValue)) >+ { >+ // Set it immediately and set it again later because something insists on changing the selection again. >+ setValue(previousValue); >+ combo.getDisplay().asyncExec >+ (new Runnable() >+ { >+ public void run() >+ { >+ setValue(previousValue); >+ } >+ }); >+ } > } > } > } >@@ -238,7 +253,7 @@ > int index = list.indexOf(value); > if (index != -1) > { >- super.doSetValue(list.indexOf(value)); >+ super.doSetValue(index); > } > } >
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
Actions:
View
|
Diff
Attachments on
bug 290555
:
148138
| 161110