Bug 161210 - [Viewers] ComboViewer.update() or refresh() causes the combo text to change
Summary: [Viewers] ComboViewer.update() or refresh() causes the combo text to change
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-17 07:39 EDT by Denis Jouvin CLA
Modified: 2019-09-06 16:04 EDT (History)
2 users (show)

See Also:


Attachments
testcase for comment 0 (958 bytes, text/plain)
2007-08-18 04:09 EDT, David Császár CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Jouvin CLA 2006-10-17 07:39:38 EDT
When the content provider calls update(..) on one of the element in the combo list, with a different text or element in the combo text area (so it is neither selected nor copied in this text area), or does a full refresh(), then the combo text is changed to a previous value, and the current combo text is discarded.

Acoording to the doc the update should only update the concerned element, and rearrange the order if the property associated is marked as affecting order.

Even for a full refresh, the text of the combo should not be modified. The combo text is not part of the list and should not be affected by the comboViewer content provider callbacks.

This prevents from using the comboViewer and combo correctly.
Comment 1 David Császár CLA 2007-08-16 02:01:23 EDT
i'm using an SWT.READ_ONLY combo viewer.
after the model changed it's value:
when using refresh() i don't see the behaviour described here.
but i'd *expect* the selection to be updated.

quote from javadoc: Refreshes this viewer completely with information freshly obtained from this viewer's model.
Comment 2 Thomas Schindl CLA 2007-08-16 02:24:52 EDT
Can one of you 2 please provide a codesnippet?
Comment 3 David Császár CLA 2007-08-18 04:09:36 EDT
Created attachment 76364 [details]
testcase for comment 0

testcase demonstrating the original problem.
the (user entered) value is lost if there has been a selection before, and update() is called after the input.

there's no test for my comment 1 as i don't know how to demonstrate it.
in my use case the selection is part of the model, but i can't find a way to reflect an updated selection without exposing knowledge about the model to the notifier code. (i'd like to keep this within the viewer.)
setInput() doesn't work because of bug 187263, so i hoped refresh() would do.

however i'm not sure if this is related to this bug at all.
Comment 4 Boris Bokowski CLA 2009-11-26 09:54:09 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:04:34 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.