Skip to main content



      Home
Home » Eclipse Projects » e(fx)clipse » ClassCastException in PopupMenuService
ClassCastException in PopupMenuService [message #1239496] Tue, 04 February 2014 05:08 Go to next message
Eclipse UserFriend
Hi,

When using the PopupMenuService to register a ContextMenu on a TreeCell, I get the following ClassCastException :

org.eclipse.fx.ui.workbench.renderers.fx.DefPopupMenuRenderer$ContextMenuImpl cannot be cast to javafx.scene.control.ContextMenu
at org.eclipse.fx.ui.workbench.renderers.fx.services.PartPopupMenuServiceImpl.registerMenu(PartPopupMenuServiceImpl.java:44)

I guess the problem is due to to the following line (44) in PartPopupMenuServiceImpl.registerMenu() :

return (ContextMenu) menu.getWidget();

which should instead be :

return (ContextMenu)((WPopupMenu<ContextMenu>) menu.getWidget()).getWidget();

Can one confirm this is a bug ?

Sun


Re: ClassCastException in PopupMenuService [message #1239506 is a reply to message #1239496] Tue, 04 February 2014 05:34 Go to previous message
Eclipse UserFriend
Yes this looks wrong - unfortunately it is to late for 0.9.0 which has
already been released - if you need this you'll have to get the sources
from git and patch it locally!

Please file a bug so that we can fix it in 1.0.0.

Tom

On 04.02.14 11:08, Sun Volland wrote:
> Hi,
>
> When using the PopupMenuService to register a ContextMenu on a TreeCell,
> I get the following ClassCastException :
>
> org.eclipse.fx.ui.workbench.renderers.fx.DefPopupMenuRenderer$ContextMenuImpl
> cannot be cast to javafx.scene.control.ContextMenu
> at
> org.eclipse.fx.ui.workbench.renderers.fx.services.PartPopupMenuServiceImpl.registerMenu(PartPopupMenuServiceImpl.java:44)
>
>
> I guess the problem is due to to the following line (44) in
> PartPopupMenuServiceImpl.registerMenu() :
>
> return (ContextMenu) menu.getWidget();
>
> which should instead be :
>
> return (ContextMenu)((WPopupMenu<ContextMenu>)
> menu.getWidget()).getWidget();
>
> Can one confirm this is a bug ?
>
> Sun
>
>
>
Previous Topic:Newbie question about including efxclipse into existing targe
Next Topic:e(fx)clipse 0.9.0 has been released
Goto Forum:
  


Current Time: Sat Apr 19 15:02:46 EDT 2025

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

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

Back to the top