Bug 208534 - Default value of combo option is not presented to the user correctly
Summary: Default value of combo option is not presented to the user correctly
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Les Jones CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-11-02 06:31 EDT by Les Jones CLA
Modified: 2007-12-11 13:21 EST (History)
1 user (show)

See Also:


Attachments
Example template to use for test (14.62 KB, application/x-zip-compressed)
2007-11-02 06:31 EDT, Les Jones CLA
no flags Details
Patch for possible solution (3.17 KB, patch)
2007-11-02 06:58 EDT, Les Jones CLA
no flags Details | Diff
mylyn/context/zip (1.10 KB, application/octet-stream)
2007-11-02 11:24 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Les Jones CLA 2007-11-02 06:31:19 EDT
Created attachment 81934 [details]
Example template to use for test

Build ID: I20071023-0800

Steps To Reproduce:
1. Import the attached example template
2. Run a new Eclipse application
3. In the new app, create a new Plugin project
4. Select the "Simple View Wizard" template, select Next
5. Look at the wizard page but DO NOT CHANGE ANYTHING. See that the combo is showing "Zero". 
6. Click Finish.
7. In the generated project, look at the SimpleView class there should be a line that says :
   message += " - Combo Option Selected: 2";
Whilst the value is correct (it's consistent with the default supplied by the code during initialization) it's inconsistent with the combo visible to the user.


More information:
The default value of the combos in the PDE templates is not being set correctly. (This has probably not been spotted in the existing PDE templates because they all set their default to be the first item in the list).

Whist the underlying value is correct, the value displayed to the user is not. This appears to be caused by an attempt to set the value as the text displayed in the combo. When this fails, the code selects the first item in the list. This means that although the value available subsequently to the template is correct, the value shown to the user is which ever was first in the list.
Comment 1 Les Jones CLA 2007-11-02 06:58:01 EDT
Created attachment 81938 [details]
Patch for possible solution

Possible solution that sets the combo correctly with the default value.
Comment 2 Chris Aniszczyk CLA 2007-11-02 11:24:46 EDT
thanks, good find, looking at it for 3.4M4
Comment 3 Chris Aniszczyk CLA 2007-11-02 11:24:56 EDT
Created attachment 81971 [details]
mylyn/context/zip
Comment 4 Chris Aniszczyk CLA 2007-11-02 11:54:00 EDT
nice find again.
Comment 5 Chris Aniszczyk CLA 2007-12-02 13:39:45 EST
reopening to assign to Les Jones
Comment 6 Chris Aniszczyk CLA 2007-12-02 13:40:23 EST
Thanks again Les!
Comment 7 Brian Bauman CLA 2007-12-11 13:21:35 EST
verified on I20071211-0010