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

Bug 368479

Summary: Schema combo box of entity-mappings is gone first time opening an el mapping file
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: GeneralAssignee: Karen Butzke <karenfbutzke>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kaloyan, karenfbutzke, neil.hauge
Version: unspecifiedFlags: neil.hauge: pmc_approved? (david_williams)
neil.hauge: pmc_approved? (raghunathan.srinivasan)
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved? (neil.hauge)
kaloyan: pmc_approved+
neil.hauge: pmc_approved? (cbridgha)
neil.hauge: review+
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard: PMC_approved wtp4x
Attachments:
Description Flags
screen shot showing missing schema combo
none
proposed patch none

Description Nan Li CLA 2012-01-12 13:47:39 EST
Build Identifier: I-3.4.0-20111227220343

1. Create an eclipselink mapping file and select entity-mappings element
2. Go to Entity Mappings section at JPA Details view and you'll see the combo box of Schema is gone

If you scroll down in the JPA details view so that the schema widget is no longer there and then scroll back up, it reappears. After that, it always works. It seems this problem exists just the first time one of those composites is built.

Reproducible: Always
Comment 1 Karen Butzke CLA 2012-01-12 13:55:55 EST
Created attachment 209400 [details]
screen shot showing missing schema combo

Oddly, this only happens with eclipse platform 4.2. I think anything that causes the composite to relayout fixes the problem, resizing the JPA Details view for example.

I've attached a screen shot that shows this issue.
Comment 2 Karen Butzke CLA 2012-01-12 14:01:26 EST
In AbstractEntityMappingsDetailsPage.initializeEntityMappingsSection(Composite) if you remove the OrmPackageChooser then the schema combo appears correctly. I have no idea what is happening here.
Comment 3 Pascal Filion CLA 2012-05-05 08:51:56 EDT
It seems GridLayout does not lay out the widgets correctly if SWT.FILL_HORIZONTAL is used but does it correctly with SWT.FILL_BOTH.

Change the following, line 2430:
org.eclipse.jpt.common.ui.internal.widgets.Pane.addPane(Composite, Layout)

change
   container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
to
   container.setLayoutData(new GridData(GridData.FILL_BOTH));
Comment 4 Karen Butzke CLA 2012-05-09 09:19:56 EDT
Created attachment 215325 [details]
proposed patch
Comment 5 Neil Hauge CLA 2012-05-09 09:32:22 EDT
We should probably do some cross platform testing on this.  Karen...can you test this change on a Mac?
Comment 6 Neil Hauge CLA 2012-05-11 17:26:59 EDT
Cross platform testing was a success (via Karen).
Comment 7 Neil Hauge CLA 2012-05-14 10:40:52 EDT
    Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 

UI is not rendering controls in certain places.

    Is there a work-around? If so, why do you believe the work-around is insufficient? 

Cause panel to redraw by resizing, etc.

    How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 

3 manual testers on 2 platforms.

    Give a brief technical overview. Who has reviewed this fix? 

See comment 3.  Karen and I have reviewed the fix.

    What is the risk associated with this fix? 

Fix is low risk.
Comment 8 Karen Butzke CLA 2012-05-14 16:12:11 EDT
checked in for RC1