Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » TypeReferenceCellEditor problem
TypeReferenceCellEditor problem [message #617213] Wed, 04 June 2008 09:38
Kristof Boden is currently offline Kristof BodenFriend
Messages: 5
Registered: July 2009
Junior Member
Hi, I'm having trouble with the TypeReferenceCellEditor in Eclipse 3.3.
Selecting a value for a bean property in the propertysheet using the
combobox, simply ignores the selection and results in a focuslost event on
the editor.
This used to work in Eclipse 3.2.
I'm currently working with the cvs head revision of ve
(TypeReferenceCellEditor v1.23), swt 3.3.2.v3347 and jface
3.3.1.M20070910-0800b.

Whenever I try to select a value from the CCombo list, the Editor loses
focus without firing the applyEditorValue on the CellEditor listeners. The
problem seems to be that when the Combobox Popup widget loses focus (after
selection), the combobox also loses focus... firing a focuslost on the
combobox focuslistener of the TypeReferenceCellEditor. Here's the
implementation of this focusLost handler:

combo.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
TypeReferenceCellEditor.this.focusLost();
}
});

So if the combo loses focus, this means that the celleditor will call its
focusLost method. The focusLost first checks the isActivated status of the
cellEditor which is implemented in TypeReferenceCellEditor like this:

public boolean isActivated() {
return combo.isVisible();
}

At this point the combobox seems to be visible=false, so the CellEditor
decides that the fireApplyEditorValue should not be called:

protected void focusLost() {
if (isActivated()) {
fireApplyEditorValue();
deactivate();
}
}

The stacktrace below shows where the focusLost gets called in the
TypeReferenceCellEditor.

Is there a problem in the current version of swt or jface?
I can see that the TypeReferenceCellEditor hasn't been changed since
december 2005.

Thread [main] (Suspended (breakpoint at line 135 in
TypeReferenceCellEditor$4))
TypeReferenceCellEditor$4.focusLost(FocusEvent) line: 135
TypedListener.handleEvent(Event) line: 136
EventTable.sendEvent(Event) line: 66
CCombo(Widget).sendEvent(Event) line: 938
CCombo(Widget).sendEvent(int, Event, boolean) line: 962
CCombo(Widget).sendEvent(int, Event) line: 947
CCombo(Widget).notifyListeners(int, Event) line: 706
CCombo.handleFocus(int) line: 746
CCombo$2.handleEvent(Event) line: 126
EventTable.sendEvent(Event) line: 66
Display.filterEvent(Event) line: 1141
Shell(Widget).sendEvent(Event) line: 937
Shell(Widget).sendEvent(int, Event, boolean) line: 962
Shell(Widget).sendEvent(int) line: 943
Shell(Control).sendFocusEvent(int) line: 2352
Shell(Widget).wmSetFocus(int, int, int) line: 2176
Shell(Control).WM_SETFOCUS(int, int) line: 4282
Shell(Canvas).WM_SETFOCUS(int, int) line: 343
Shell(Decorations).WM_SETFOCUS(int, int) line: 1704
Shell(Control).windowProc(int, int, int, int) line: 3738
Shell(Canvas).windowProc(int, int, int, int) line: 291
Shell(Decorations).windowProc(int, int, int, int) line: 1554
Shell.windowProc(int, int, int, int) line: 1753
Display.windowProc(int, int, int, int) line: 4364
OS.DefWindowProcW(int, int, int, int) line: not available [native method]
OS.DefWindowProc(int, int, int, int) line: 2260
Shell.callWindowProc(int, int, int, int) line: 456
Shell(Control).windowProc(int, int, int, int) line: 3760
Shell(Canvas).windowProc(int, int, int, int) line: 291
Shell(Decorations).windowProc(int, int, int, int) line: 1554
Shell.windowProc(int, int, int, int) line: 1753
Display.windowProc(int, int, int, int) line: 4351
OS.ShowWindow(int, int) line: not available [native method]
Shell(Decorations).setVisible(boolean) line: 1384
Shell.setVisible(boolean) line: 1599
CCombo.dropDown(boolean) line: 452
CCombo.listEvent(Event) line: 935
CCombo$1.handleEvent(Event) line: 106
EventTable.sendEvent(Event) line: 66
List(Widget).sendEvent(Event) line: 938
Display.runDeferredEvents() line: 3682
Display.readAndDispatch() line: 3293
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2389
Workbench.runUI() line: 2353
Workbench.access$4(Workbench) line: 2219
Workbench$4.run() line: 466
Realm.runWithDefault(Realm, Runnable) line: 289
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
IDEApplication.start(IApplicationContext) line: 106
EclipseAppHandle.run(Object) line: 169
EclipseAppLauncher.runApplication(Object) line: 106
EclipseAppLauncher.start(Object) line: 76
EclipseStarter.run(Object) line: 363
EclipseStarter.run(String[], Runnable) line: 176
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
Main.invokeFramework(String[], URL[]) line: 508
Main.basicRun(String[]) line: 447
Main.run(String[]) line: 1173
Main.main(String[]) line: 1148
Previous Topic:I can't create a Visual Class
Next Topic:Using VE beyond Eclipse 3.2.2
Goto Forum:
  


Current Time: Wed Sep 25 01:55:05 GMT 2024

Powered by FUDForum. Page generated in 0.39427 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top