Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Broken popup menu with compatibility layer
Broken popup menu with compatibility layer [message #1357433] Thu, 15 May 2014 10:16 Go to next message
Eclipse UserFriend
We have switched to Eclipse 4.3.2 and use the compatibility layer to run our Eclipse 3.7 based product. In one view I have a broken popup menu. It gets populated, but with too much entries and no labels. I think those are all dynamic menus with CompoundContributionItem. Are there any known problems with that?

index.php/fa/18093/0/
Re: Broken popup menu with compatibility layer [message #1359009 is a reply to message #1357433] Fri, 16 May 2014 02:11 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

I also had some problems with menu and popup items, which were not visible. There are still some bugs concerning menus in e4 (e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=383403). You can try to have a look at Eclipse 4.4.

You could add the popup menu programmatically. This still works fine. I know that this is not a nice workaround, but solves the problem, if you are in the compatibility layer.
Re: Broken popup menu with compatibility layer [message #1359295 is a reply to message #1359009] Fri, 16 May 2014 05:02 Go to previous messageGo to next message
Eclipse UserFriend
Already tried 4.4M7, but nothing changed.
Re: Broken popup menu with compatibility layer [message #1359336 is a reply to message #1359295] Fri, 16 May 2014 05:25 Go to previous messageGo to next message
Eclipse UserFriend
then file a bug with a reproduceable sample.

Tom

On 16.05.14 11:02, Karl Puperze wrote:
> Already tried 4.4M7, but nothing changed.
Re: Broken popup menu with compatibility layer [message #1359870 is a reply to message #1359336] Fri, 16 May 2014 10:48 Go to previous messageGo to next message
Eclipse UserFriend
I did a little debugging! The dynamic menu contribution has a visible when condition. The PopupMenuExtender tries to fill this menu contribution before the visible when condition gets evaluated. In this case the implementing class is expecting something different and therefore throws a NullPointerException. In eclipse 3.x it was handled differently. The visible when condition was evaluated first and in this case the getContributionItems method was never called and never threw an exception. Is the new handling implemented on purpose or is it a bug? When handling changed I need to review all my dynamic menu contribution implementations and make them more failsafe.

By the way: You see the NullPointerException only with activated trace options!

[Updated on: Fri, 16 May 2014 10:49] by Moderator

Re: Broken popup menu with compatibility layer [message #1359957 is a reply to message #1359870] Fri, 16 May 2014 11:39 Go to previous message
Eclipse UserFriend
Best is to file a bug

Tom

On 16.05.14 16:48, Karl Puperze wrote:
> I did a little debugging! The dynamic menu contribution has a visible
> when condition. The PopupMenuExtender tries to fill this menu
> contribution before the visible when condition gets evaluated. In this
> case the implementing class is expecting something different and
> therefore throws a NullPointerException. In eclipse 3.x it was handled
> differently. The visible when condition was evaluated first and in this
> case the getContributionItems method was never called and never threw an
> exception. Is the new handling implemented on purpose or is it a bug?
> When handling changed I need to review all my dynamic menu contribution
> implementations and make them more failsafe.
Previous Topic:[Resolved] Wrong merged application model when using compatibility layer
Next Topic:Eclipse RCP Data Binding with WritableValue - Int vs. Integer
Goto Forum:
  


Current Time: Wed Jul 23 15:18:36 EDT 2025

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

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

Back to the top