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 160989 Details for
Bug 304715
A problem with org.eclipse.emf.common.ui.celleditor.ExtendedComboBoxCellEditor
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]
Patch
ExtendedComboboxCellEditorFix.txt (text/plain), 2.12 KB, created by
Lidija Grahek
on 2010-03-04 13:15:23 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Lidija Grahek
Created:
2010-03-04 13:15:23 EST
Size:
2.12 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 4 Mar 2010 16:20:59 -0000 >@@ -1,7 +1,7 @@ > /** > * <copyright> > * >- * Copyright (c) 2002-2007 IBM Corporation and others. >+ * Copyright (c) 2002-2010 IBM Corporation 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 >@@ -178,6 +178,8 @@ > protected ILabelProvider labelProvider; > > protected boolean sorted; >+ >+ int selectionInOriginalList; > > public ExtendedComboBoxCellEditor(Composite composite, List<?> list, ILabelProvider labelProvider) > { >@@ -227,7 +229,16 @@ > // Get the index into the list via this call to super. > // > int index = (Integer)super.doGetValue(); >- return index < list.size() && index >= 0 ? list.get((Integer)super.doGetValue()) : null; >+ if (isActivated()) { >+ Object value = index < list.size() && index >= 0 ? list.get((Integer)super.doGetValue()) : null; >+ if (value != null) { >+ // remember this if the editor is asked for its value after list is wiped out >+ // (it's wiped out on deactivation) >+ selectionInOriginalList = originalList.indexOf(value); >+ } >+ return value; >+ } >+ return originalList.get(selectionInOriginalList); > } > > @Override >@@ -238,7 +249,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 304715
: 160989