Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335343

Summary: Convert value lost after changing the focus area
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: GeneralAssignee: Nan Li <nan.n.li>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: brian.vosburgh, jolene.moffitt, neil.hauge
Version: unspecifiedFlags: brian.vosburgh: review+
Target Milestone: 3.0 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch neil.hauge: iplog+

Description Nan Li CLA 2011-01-25 11:59:13 EST
Build Identifier: 20100917-0705

The value set to the convert attribute is lost once switching from current focus area to the other. This happens with both Java and orm convert. 
-With Java convert, the value gets removed, but @Convert annotation is left.
-With orm convert, convert element gets completely removed from the mapping file.


Reproducible: Always

Steps to Reproduce:
1. Selecting an convertible mapping in the editor
2. In JPA detail view, select Type -> Converted and choose a name from the "Converter name" dropdown list
3. Selecting any other focus area in the editor, e.g. the entity name

Note: 
1) This problem doesn't exist if selecting any one of the reserved converters from the "Converter name" dropdown list
2) This problem doesn't exist if directly typing the name of an converter in the "Converter name" field now matter whether the name is already in the dropdown list or not.
Comment 1 Neil Hauge CLA 2011-02-07 18:04:10 EST
This is pretty bad.  Needs to be fixed in 3.0 release.
Comment 2 Nan Li CLA 2011-02-24 17:57:40 EST
Created attachment 189757 [details]
patch

1. The changes for AbstractComboModelAdapter are the fixes of this bug.
2. The changes for EclipseLinkConvertComposite are the fixes of the default value issues.
3. The changes for GeneratedValueComposite are made as what Brain suggested. On one hand, it gets the value from the aspect adapter instead of the pane; on the other hand, the new implementation invokes getUniqueGeneratorNames() to filter out the duplicate names instead of using the intenal filtering mechanism of SortedListValueModelAdapter which makes the logic more intuitive.
Comment 3 Neil Hauge CLA 2011-03-14 23:39:18 EDT
This has been fixed in M6.
Comment 4 Jolene Moffitt CLA 2011-04-05 10:40:27 EDT
Verified in Build I-3.3.0-20110331154142

Verified that when you change focus from the convert value it does not disappear.  See the link to view test steps for verification. 
http://wiki.eclipse.org/Dali_3.0_M6