Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » TypeReferenceCellEditor problem
TypeReferenceCellEditor problem [message #144963] Wed, 04 June 2008 09:38 Go to next message
Eclipse UserFriend
Originally posted by: kboden.trispark.com

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
Re: TypeReferenceCellEditor problem [message #145012 is a reply to message #144963] Wed, 18 June 2008 07:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kboden.trispark.com

Tested it with Eclipse 3.4 RC2 and the new VE build posted here by Yves
Yang. Still doesn't work.
The TypeReferenceCellEditor doesn't even display the popup list when the
arrow is pressed.
Re: TypeReferenceCellEditor problem [message #145251 is a reply to message #145012] Fri, 04 July 2008 07:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kboden.trispark.com

Hi,

can anyone confirm this issue with the TypeReferenceCellEditor in the
property sheet?

Regards
Kristof
Re: TypeReferenceCellEditor problem [message #145267 is a reply to message #145251] Thu, 17 July 2008 10:56 Go to previous message
Eclipse UserFriend
Originally posted by: kboden.trispark.com

downloaded the new ganymede release and the VE plugin from ehecht.com

This basic example doesn't work. I think VE is pretty useless without
this functionality:

1. Create class MyButton with extra MyLabel property:

public class MyButton extends JButton {
private JLabel myLabel;

public JLabel getMyLabel() {
return myLabel;
}

public void setMyLabel(JLabel myLabel) {
this.myLabel = myLabel;
}

}

2. Create new JPanel and drop a JLabel and a MyButton on the panel
3. Open the properties view of the myButton and try to select jLabel in
the value column.

=> dropdown is not displayed!


Am I missing anything here? Does anyone know what may be causing this
problem?
Re: TypeReferenceCellEditor problem [message #617218 is a reply to message #144963] Wed, 18 June 2008 07:11 Go to previous message
Kristof Boden is currently offline Kristof BodenFriend
Messages: 5
Registered: July 2009
Junior Member
Tested it with Eclipse 3.4 RC2 and the new VE build posted here by Yves
Yang. Still doesn't work.
The TypeReferenceCellEditor doesn't even display the popup list when the
arrow is pressed.
Re: TypeReferenceCellEditor problem [message #617239 is a reply to message #145012] Fri, 04 July 2008 07:10 Go to previous message
Kristof Boden is currently offline Kristof BodenFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

can anyone confirm this issue with the TypeReferenceCellEditor in the
property sheet?

Regards
Kristof
Re: TypeReferenceCellEditor problem [message #617248 is a reply to message #145251] Thu, 17 July 2008 10:56 Go to previous message
Kristof Boden is currently offline Kristof BodenFriend
Messages: 5
Registered: July 2009
Junior Member
downloaded the new ganymede release and the VE plugin from ehecht.com

This basic example doesn't work. I think VE is pretty useless without
this functionality:

1. Create class MyButton with extra MyLabel property:

public class MyButton extends JButton {
private JLabel myLabel;

public JLabel getMyLabel() {
return myLabel;
}

public void setMyLabel(JLabel myLabel) {
this.myLabel = myLabel;
}

}

2. Create new JPanel and drop a JLabel and a MyButton on the panel
3. Open the properties view of the myButton and try to select jLabel in
the value column.

=> dropdown is not displayed!


Am I missing anything here? Does anyone know what may be causing this
problem?
Previous Topic:What is the status of this project?
Next Topic:roadmap
Goto Forum:
  


Current Time: Fri Apr 26 11:23:39 GMT 2024

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

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

Back to the top