Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Broken popup menu with compatibility layer
Broken popup menu with compatibility layer [message #1357433] Thu, 15 May 2014 14:16 Go to next message
Karl Puperze is currently offline Karl PuperzeFriend
Messages: 36
Registered: August 2011
Member
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 06:11 Go to previous messageGo to next message
Stefan Weiser is currently offline Stefan WeiserFriend
Messages: 55
Registered: February 2012
Member
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 09:02 Go to previous messageGo to next message
Karl Puperze is currently offline Karl PuperzeFriend
Messages: 36
Registered: August 2011
Member
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 09:25 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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 14:48 Go to previous messageGo to next message
Karl Puperze is currently offline Karl PuperzeFriend
Messages: 36
Registered: August 2011
Member
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 14:49]

Report message to a moderator

Re: Broken popup menu with compatibility layer [message #1359957 is a reply to message #1359870] Fri, 16 May 2014 15:39 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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: Tue Mar 19 11:55:49 GMT 2024

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

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

Back to the top