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 25045 Details for
Bug 60462
[CellEditors] applyEditorValueAndDeactivate() in ComboBoxCellEditor gets index exception.
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]
Use the text from the edit control if the 'selection' index == -1
patch(60462).txt (text/plain), 1.46 KB, created by
Eric Moffatt
on 2005-07-20 10:55:16 EDT
(
hide
)
Description:
Use the text from the edit control if the 'selection' index == -1
Filename:
MIME Type:
Creator:
Eric Moffatt
Created:
2005-07-20 10:55:16 EDT
Size:
1.46 KB
patch
obsolete
>Index: ComboBoxCellEditor.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboBoxCellEditor.java,v >retrieving revision 1.13 >diff -u -r1.13 ComboBoxCellEditor.java >--- ComboBoxCellEditor.java 25 Feb 2005 20:39:51 -0000 1.13 >+++ ComboBoxCellEditor.java 20 Jul 2005 14:52:23 -0000 >@@ -244,11 +244,22 @@ > markDirty(); > boolean isValid = isCorrect(newValue); > setValueValid(isValid); >+ > if (!isValid) { >- // try to insert the current value into the error message. >- setErrorMessage(MessageFormat.format(getErrorMessage(), >- new Object[] { items[selection] })); >+ // Fix for 60462...only format if the 'index' is valid >+ if (items.length > 0 && selection >= 0 && selection < items.length) { >+ // try to insert the current value into the error message. >+ setErrorMessage(MessageFormat.format(getErrorMessage(), >+ new Object[] { items[selection] })); >+ } >+ else { >+ // Since we don't have a valid index, assume we're using an 'edit' >+ // combo so format using its text value >+ setErrorMessage(MessageFormat.format(getErrorMessage(), >+ new Object[] { comboBox.getText() })); >+ } > } >+ > fireApplyEditorValue(); > deactivate(); > }
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 60462
: 25045