Community
Participate
Working Groups
using wtp 3.0 m6 I20080328145129 1. create a complex type 2. add element ref 3. click on the element ref combo box and browse for existing element 4. select something and then hit ok. you end up with the following in the log: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3766) at org.eclipse.swt.SWT.error(SWT.java:3684) at org.eclipse.swt.SWT.error(SWT.java:3655) at org.eclipse.swt.widgets.Widget.error(Widget.java:462) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:335) at org.eclipse.swt.custom.CCombo.getSelectionIndex(CCombo.java:712) at org.eclipse.wst.xsd.ui.internal.adt.design.directedit.ADTComboBoxCellEditor.applyEditorValueAndDeactivate(ADTComboBoxCellEditor.java:302) at org.eclipse.wst.xsd.ui.internal.adt.design.directedit.ADTComboBoxCellEditor$2.widgetSelected(ADTComboBoxCellEditor.java:169) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) same thing also happens if you select New instead of Browse.. For both cases, the element ref you want is not used. You can set the element ref from the properties view fine though. Also same problem if you try attribute ref as well.
i meant to open this on the xsd component, not wsdl.
Keith, be sure to attach the patch and have it reviewed by someone before releasing it. Test well.
This probelm is caused by a change in behaviour to the custom SWT widget CCombo which broke our customized code. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=142981 Their change deactivates the CCombo asynchronously. When the user selects Browse... or New... from our custom combo box cell editor, the appropriate Browse/New dialog appears. This takes focus away from the CCombo and subsequently gets deactivated and disposed. When the user is clicks OK from the Browse/New dialog, the custom cell editor is supposed to apply the editor value and deactivate. Unfortunately, by this time, the cell editor/combobox has already been deactivated and disposed.
Created attachment 94419 [details] Apply to org.eclipse.wst.xsd.ui
fix looks good.
Thanks Amy for reviewing this. Released for 3.0 M6.
verified for wtp3.0M6 20080403100029-sdk
Closing.