| CCombo null pointer exception on unselect [message #453236] |
Fri, 01 April 2005 09:58  |
Eclipse User |
|
|
|
Hi all,
I am developping an editor with GEF and I found bad NullPointerException :
while
inside an combobox cell editor whith the values list opened, if I click in
the C++ explorer on a project, a folder or a file the following exception
raise (partial stak trace):
java.lang.NullPointerException
at org.eclipse.swt.custom.CCombo.dropDown(CCombo.java:349)
at org.eclipse.swt.custom.CCombo.popupEvent(CCombo.java:895)
at org.eclipse.swt.custom.CCombo$1.handleEvent(CCombo.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:801)
at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations. java:1434)
at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1336)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:2969 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1391)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338 )
at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
at org.eclipse.swt.widgets.Control.forceFocus(Control.java:607)
at org.eclipse.swt.widgets.Control.setFocus(Control.java:2054)
at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:44 7)
at org.eclipse.cdt.internal.ui.cview.CView.setFocus(CView.java: 191)
at org.eclipse.ui.internal.WorkbenchPage$2.run(WorkbenchPage.ja va:471)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
at
org.eclipse.ui.internal.WorkbenchPage.activatePart(Workbench Page.java:468)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:2722)
I create the ComboBoxCellEditor to perform a direct edit.
I didn't found a combo box in Logic to test it and I can't found a bug in
bugzilla.
After some debugging I foud folowing: (code snipped from CCombo, lines
around 349)
void dropDown (boolean drop) {
if (drop == isDropped ()) return;
if (!drop) {
348 popup.setVisible (false);
349 text.setFocus();
return;
}
If I set a breakpoint at line 349 the member text is null and this causes
the exception. But more important: the CCombo object (this) at this moment
is disposed. Instead, if I set the breakpoint at line 348, the CCombo is
OK, text is OK and continuing with F8 will not rise the exception.
Note that even with exception my field is updated to the last selected
value as
expected.
What am I doing wrong?
I am using Eclipse 3.0.1 with GEF 3.0.1 on Win 2k
Thanks in advance for any help
Roberto
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03783 seconds