eclipse does not work with appmenu

Bug #618587 reported by Sergey Klimov
This bug affects 288 people
Affects Status Importance Assigned to Milestone
AppMenu GTK+
Invalid
Undecided
Unassigned
Application Menu Indicator
Invalid
Undecided
Unassigned
DBus Menu
Fix Released
Medium
Unassigned
Eclipse
Unknown
Critical
Unity Foundations
Fix Released
Medium
Michael Terry
Unity GTK+ module
Invalid
Undecided
Unassigned
libdbusmenu (Ubuntu)
Fix Released
Low
Ted Gould
Natty
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: indicator-appmenu

eclipse do not work

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: indicator-appmenu 0.0.9-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-15.21-generic 2.6.35.1
Uname: Linux 2.6.35-15-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon Aug 16 13:06:20 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100803.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=ru_UA.UTF-8
 SHELL=/bin/bash
SourcePackage: indicator-appmenu

Related branches

Revision history for this message
Sergey Klimov (nbdarvin) wrote :
Vallery Lancey (muscovy)
Changed in indicator-appmenu (Ubuntu):
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

Ted, is that worth investigating?

Changed in indicator-appmenu (Ubuntu):
assignee: nobody → Ted Gould (ted)
importance: Undecided → Low
Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 618587] Re: eclipse do not work with appmenu

On Fri, 2010-08-20 at 17:21 +0000, Sebastien Bacher wrote:
> Ted, is that worth investigating?

I don't know, it's probably worth leaving on the list. Since menus are
only default in UNE, and I doubt there are a huge number of Eclipse
users on their netbooks, it seems like Low priority is appropriate.

Ted Gould (ted)
summary: - eclipse do not work with appmenu
+ eclipse does not work with appmenu
Revision history for this message
Nikita Vetoshkin (nikita-vetoshkin) wrote :

>Since menus are only default in UNE
True about default, but bigger-laptop users would like to use global menu too. Please investigate on this.

Revision history for this message
Paul Ferraro (pmf8) wrote :

I agree with Nikita. Vertical space is just as precious a commodity for programmers with big laptops as it is for lay-users with tiny netbooks, especially for these, now ubiquitous, 16:9 screens.

Revision history for this message
José Iván León Islas (cool2k) wrote :

I am a desktop user and i would like this to be resolved.. Until that I will switch to the gnome-global-menu, but if I can help I would gladly do it, just let me know...

Revision history for this message
Aaron (c-fajun) wrote :

I am also a desktop user. And this bug is the main reason I finally removed the appmenu after a try. Please fix this bug. Thank you.

Revision history for this message
Gábor Pusztai (apusztaigabor) wrote :

I'm a desktop user (running kubuntu desktop) and I also would like this bug to be fixed.

Until it gets fixed, I've found a workaround: the application runs with its own menubar when it runs it with the UBUNTU_MENUPROXY environment variable set to 0. You can run eclipse with the following command:

env UBUNTU_MENUPROXY=0 eclipse

Revision history for this message
D. Wegener (dpwegener) wrote :

I am using Eclipse on a netbook and would like to use the indicator appmenu so save screen real estate. When running Lucid, it was possible to get menus to display by pressing Alt-F for file, etc. Once displayed, the menu items would remain until Eclipse was restarted. Under Maverick, it isn't possible to get any menus to display.

Revision history for this message
corristo (corrmage) wrote :

http://askubuntu.com/questions/10481/does-will-unity-support-disabling-the-global-menu
after that I think this bug importance should be raised :)

Revision history for this message
Nikola Trifunović (nikola-trifunovic) wrote :

This needs to be fixed :(
Eclipse is working great under gnome-globalmenu, maybe the code can be reused!

Revision history for this message
Michael Terry (mterry) wrote :

I opened an appmenu-gtk task for this. This is basically a dup of bug 613119, but since that is the bug that implemented the workaround of disabling the global menu for eclipse, this one can be about fixing the root cause.

There is an upstream bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=330563

From my investigation, I believe it is at least partly caused by the fact that SWT doesn't emit the "realize" signal that appmenu-gtk watches for to start populating the menu.

Revision history for this message
Michael Terry (mterry) wrote :

Here is a test case I've been using. It's a modified AccessibleNameExample from org.eclipse.swt.examples.accessibility.

Alex Launi (alexlauni)
Changed in appmenu-gtk:
status: New → Confirmed
Changed in indicator-appmenu (Ubuntu):
status: Incomplete → Confirmed
Alex Launi (alexlauni)
tags: added: parser
Revision history for this message
Ted Gould (ted) wrote :

Marking invalid for appmenu-gtk and appindicator as this is a dbusmenu issue now that the parser is there.

affects: indicator-appmenu (Ubuntu) → libdbusmenu (Ubuntu)
Changed in appmenu-gtk:
status: Confirmed → Invalid
Changed in indicator-appmenu:
status: New → Invalid
Changed in dbusmenu:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Michael Terry (mterry) wrote :

OK, more info and some success. I've managed to get SWT apps that eclipse launches to show in the appmenu [1]. But this fix doesn't affect eclipse itself. So I'm looking into that before I propose a merge.

[1] There's a bug in appmenu-gtk's app_menu_bridge_insert that causes it to ignore already-realized toplevels passed to it.

Revision history for this message
Michael Terry (mterry) wrote :

Here's the fix I mentioned about SWT apps: https://code.launchpad.net/~mterry/appmenu-gtk/rebuild-if-realized/+merge/48827

Eclipse is doing some really funky stuff with their menus. It seems that each menu pops up its own toplevel window that is only created when the menu entry is clicked? I'm putting that aside for the moment. At least other SWT apps can work now.

Revision history for this message
avlas (avlas) wrote :

Will Matlab be benefited from this fix as well?

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 618587] Re: eclipse does not work with appmenu

On Mon, 2011-03-07 at 15:16 +0000, Salva wrote:
> Will Matlab be benefited from this fix as well?

Don't know. Last I used Matlab (about 10 years ago) they were based on
the Motif toolkit -- and that would be a no. Someone with Matlab will
have to check.

Revision history for this message
Conscious User (conscioususer) wrote :

Just to confirm, is there still any hope for Eclipse working with the Natty appmenu?

Revision history for this message
Michael Terry (mterry) wrote :

There's hope, but it's slightly dim for natty's release. It's technically possible, just has to be figured out.

David Barth (dbarth)
Changed in unity-foundations:
assignee: nobody → Michael Terry (mterry)
importance: Undecided → Medium
milestone: none → ubuntu-11.04-beta-1
status: New → Confirmed
Michael Terry (mterry)
Changed in audacity:
status: New → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

bug #725331 is a similar issue about "zend studio" which is an eclipse customized version it seems

Revision history for this message
Michael Terry (mterry) wrote :

Good news, I got most of the items to appear. The appmenu indicator has this trick it does where it fakes an activation on toplevel menu items because some apps lazily calculate menus based on activation signals. But Eclipse actually lazily calculates menus on *show* signals. So faking a show gets the menus to appear.

But now I'm seeing issues with toplevel entries not swapping in and out correctly as you focus different parts of the IDE as well as some menu item labels not updating correctly. Looking into it.

Changed in unity-foundations:
status: Confirmed → In Progress
Revision history for this message
Michael Terry (mterry) wrote :

OK. Here's a brain dump. There are several issues with eclipse:
1) Menu items (including toplevel entries) don't appear
2) Some menu items (especially the first in a menu) have the text "Label Empty" instead of real text
3) Accelerators (keyboard shortcuts) are not shown
4) When eclipse wants to change its toplevel entries, that isn't reflected in the appmenu

#1 and #2 can be mostly fixed by showing the menu items as they come in, like I mention in the previous comment.

#2 can be partly fixed by handling how SWT apps handle accelerators (they use deprecated direct access to label structs to set the visible shortcut, then go and separately set the accelerator for the menu item directly). I have a fix for this [1]. But most of eclipse's menu items also don't even pass the accelerator to gtk. They directly set the visible string, but don't set the accelerator on the gtk menu item at all, handling them itself. This needs either a patch to eclipse or a plugin or something. I haven't quite figured where this patch needs to be, but I believe it might be in eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java.

#3 I haven't been able to track down. It is passing the items to indicator-appmenu correctly, but the items are never "realized". This is very similar to what I was seeing with #1, so I'm probably just not 'showing/hiding' in the right place.

In summation, I don't believe this is a good use of time for natty. Best for oneiric.

[1] https://code.launchpad.net/~mterry/dbusmenu/check-gmi-for-accel-closures/+merge/54230

David Barth (dbarth)
Changed in unity-foundations:
milestone: unity-3.8.0-beta → none
Michael Terry (mterry)
Changed in unity-foundations:
status: In Progress → Confirmed
Revision history for this message
Elvis Dominguez (elvisd79) wrote :

Just as add. info:
I have installed natty beta2 (everything up-to-date 2011-04-21), installed eclipse 3.6 (not from software center, I have downloaded zip file).
Eclipse's menu is show 'in-window' (old-style) but when i launch my own rcp app from eclipse the rcp application itself doesn't have any menu, appmenu nor in-window. This is a problem. Any workarounds?

Revision history for this message
Elvis Dominguez (elvisd79) wrote :

starting eclipse with
  UBUNTU_MENUPROXY=0 && eclipse
did the trick.

Revision history for this message
Stefan (sbossb) wrote :

The "UBUNTU_MENUPROXY=0" workaround did not work for me. I am also running eclipse from eclipse website and not from the repository.

Revision history for this message
Michael Terry (mterry) wrote :

I think Elvis D. meant to write "UBUNTU_MENUPROXY=0 eclipse" (without the &&).

I've opened a new bug (bug 770263) to deal with the RCP issue. It may be slightly separate from Eclipse itself (which is already worked around anyway).

Revision history for this message
Elvis Dominguez (elvisd79) wrote :

@Stefan: i have created a start.sh file with following content:
#!/bin/sh
UBUNTU_MENUPROXY=0
cd /opt/helios
./eclipse

i start eclipse using the above file. HTH

Revision history for this message
Michael Terry (mterry) wrote :

With https://code.launchpad.net/~mterry/dbusmenu/eclipse-rcp/+merge/59277 merged, the only remaining issue will be the shortcut labels.

Revision history for this message
Stefan (sbossb) wrote :

@Elvis D.
Thanks for your help but it still is not working right. Hopefully the new merge will fix it.

Revision history for this message
Pablo Saavedra (pablo-a-saavedra) wrote :

I have a freshly installed Natty, with Eclipse 3.6 from eclipse.org and the UBUNTU_MENUPROXY=0 workaround doesn't work for me. Is there any updates on the fix for this?

Revision history for this message
Ben Rousch (brousch) wrote :

I encountered this issue with Aptana Studio 3 which is based on Eclipse. Elvis Dominguez's workaround seems to be working for me. https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/618587/comments/28

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libdbusmenu - 0.4.90-0ubuntu1

---------------
libdbusmenu (0.4.90-0ubuntu1) oneiric; urgency=low

  [ Ted Gould ]
  * debian/control, debian/*: Renaming packages for library version
    bump from 3 to 4.
  * New upstream release.
    * Fixing visibility for Eclipse (LP: #770263 and LP: #618587)
    * Unseting a GValue properly (LP: #785828)
    * Memory leaks for GVariant usage (LP: #784890)
    * Making GTK 3 default build
    * Removing the SerializableMenuitem object
  * debian/rules: Making GTK2 the special build

  [ Ken VanDine ]
  * +debian/libdbusmenu-jsonloader4.symbols
  * debian/*.symbols
    - Fixed sonames and removed all the duplicate symbols
  * debian/*.install, debian/rules
    - Use cdbs to do the dual builds for gtk2/gtk3
  * debian/control
    - Updated standards version to 3.9.2
    - Set version on the json-glib build depends to >= 0.13.4
    - Make gir1.2-dbusmenu-glib-0.4 break gir1.2-unity-3.0 and
      gir1.2-indicate-0.5 built against older versions of dbusmenu to
      prevent breakage in python apps that use gir loading multiple versions
      of dbusmenu-glib
 -- Ken VanDine <email address hidden> Fri, 24 Jun 2011 14:55:59 -0400

Changed in libdbusmenu (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Adrian Wechner (adrian-wechner) wrote :

> This bug was fixed in the package libdbusmenu - 0.4.90-0ubuntu1

will that be released with the update manager or do I have to install it by my way? i am on ubuntu 11.04

Revision history for this message
Yuriy Yarovoy (yuriy-yarovoy) wrote :

How can I use fixed package on my Ubuntu 11.04?

Revision history for this message
Arnaud Soyez (weboide) wrote :

The fix will be available in Oneiric. For Natty and earlier versions you
will have to wait until the fix is backported (and if it is going to be
backported).

Revision history for this message
Omer Akram (om26er) wrote :

I have uploaded libdbusmenu to my ppa[1] with the fix to this bug for Natty users, Launchpad it seems is quite busy these days and will take quite a few hours to complete the build for libdbusmenu, please test and report back if that fixes the issue and I am working on the SRU as well.

[1] https://launchpad.net/~om26er/+archive/test

Changed in dbusmenu:
status: Confirmed → Fix Released
Changed in unity-foundations:
status: Confirmed → Fix Released
Revision history for this message
Yuriy Yarovoy (yuriy-yarovoy) wrote :

Omer Akram, thank you! But which parameter should I pass to Eclipse for using Unity appmenu instead Eclipse inner menu-bar?

Revision history for this message
Mingming Ren (portis25) wrote :

Eclipse has been blacklisted. You have to modify package appmenu-gtk and rebuild it to remove it from the blacklist.

Revision history for this message
Omer Akram (om26er) wrote :

thanks Mingming I have now uploaded appmenu-gtk that un blacklists
eclipse to my ppa.

On Sat, Aug 20, 2011 at 8:15 PM, Mingming Ren <email address hidden> wrote:
> Eclipse has been blacklisted. You have to modify package appmenu-gtk and
> rebuild it to remove it from the blacklist.
>
> --
> You received this bug notification because you are a member of DBus Menu
> Team, which is subscribed to libdbusmenu in Ubuntu.
> https://bugs.launchpad.net/bugs/618587
>
> Title:
>  eclipse does not work with appmenu
>
> Status in Application menu module for GTK+:
>  Invalid
> Status in Audacity:
>  Invalid
> Status in DBus Menu:
>  Fix Released
> Status in Eclipse:
>  Unknown
> Status in The Application Menu:
>  Invalid
> Status in Unity Foundations:
>  Fix Released
> Status in “libdbusmenu” package in Ubuntu:
>  Fix Released
>
> Bug description:
>  Binary package hint: indicator-appmenu
>
>  eclipse do not work
>
>  ProblemType: Bug
>  DistroRelease: Ubuntu 10.10
>  Package: indicator-appmenu 0.0.9-0ubuntu1
>  ProcVersionSignature: Ubuntu 2.6.35-15.21-generic 2.6.35.1
>  Uname: Linux 2.6.35-15-generic x86_64
>  NonfreeKernelModules: nvidia
>  Architecture: amd64
>  Date: Mon Aug 16 13:06:20 2010
>  InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100803.1)
>  ProcEnviron:
>   PATH=(custom, user)
>   LANG=ru_UA.UTF-8
>   SHELL=/bin/bash
>  SourcePackage: indicator-appmenu
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/appmenu-gtk/+bug/618587/+subscriptions
>

Changed in libdbusmenu (Ubuntu Natty):
status: New → Confirmed
Changed in libdbusmenu (Ubuntu Natty):
status: Confirmed → Won't Fix
34 comments hidden view all 114 comments
Revision history for this message
In , Hceylan (hceylan) wrote :

I have noticed the following:

When I run normal Eclipse on 12.04 Alpha, menu appears as traditional.
When I run an Eclipse org.eclipse.platform.ide *product* menu appears as traditiona.

But if I run org.eclipse.ui.ide.application *application* then menu behaves in line with Unity Desktop - appearing at top bar.

I think that makes a difference.

Regards,
Hasan Ceylan

Changed in eclipse:
importance: Unknown → Critical
status: Unknown → Confirmed
Revision history for this message
In , jose vilmar estacio de souza (vilmar-informal) wrote :

Running ubuntu 11.10, unity 2d and eclipse 3.7, I found that the f10 key does not activate the menu.

Revision history for this message
In , Hceylan (hceylan) wrote :

For those who are affected with this bug, the dirty hack is to remove the product from config.ini .

The downside I could see is that
- you loose the progress baron the splash and the product
- About Dialog looks ugly with the product image and product description missing.

There may be some complications, I'll try to test and report if I find a show stopper.

Regards,
Hasan Ceylan

Revision history for this message
In , Adamh-r (adamh-r) wrote :

Guys, is this a joke? This bug was reported around 1.5 years ago and still no one was able to fix it?

Are you kidding me, that in 1.5 years the very best idea is to hack my system files with vim?

That's plain ridiculous...

Revision history for this message
In , Akurtakov (akurtakov) wrote :

(In reply to comment #26)
> Guys, is this a joke? This bug was reported around 1.5 years ago and still no
> one was able to fix it?
>
> Are you kidding me, that in 1.5 years the very best idea is to hack my system
> files with vim?
>
> That's plain ridiculous...

You know that this is open source, right? Who do you think should step in and fix it?
I would say someone that cares about Unity.

Revision history for this message
In , Adamh-r (adamh-r) wrote :

Hi Alexander,

Yes, I know it's an open source one, and I realize that this is the death of the open source world: pointing at each other all the time. If you report a bug at Unity/Ubuntu, they point at this bug report. If you report it here, you say it's their fault, they should fix it!

See, my point is: from my perspective, I don't give a flying damn who's fault is it. It's a bug that has been reported and confirmed for 1.5 years.

It's so sad to see that all those talented people who are willing to contribute their efforts to these projects just want to create another 'world changing' project instead of solving the problems right here. Why bother with Netbeans, let's fix Eclipse. Oh, Eclipse got problems too, let's deal with jEdit. Oh, jEdit sucks too, let's...

I wish you'd charge $5 for every open source project. I wish you'd support it. I wish I could rely on you and your supported project.

I simply do not need 15 faulty Java IDEs. Nor need many version of Java runtime. I need one, that works and that is more than enough!

But now, what choices do I have? I have to opt out from Ubuntu as it's got severe, unresolved, "it's not my fault" type of bugs. Should I buy Apple? Oh, well, JDK 1.7 is not fully supported. Moving forward... Guess which platform is fully supported?

Anyway, please don't tell me that it has been hard for any Eclipse devs/architects to chase down a Ubuntu dev/architect while having a beer: hey, we need to fix it! Oh, well, I'll do it, it takes only 15 minutes or, whatever...

Or if this conversation is impossible, I'd strongly suggest abandoning any open source projects and supporting only licensed ones - they can and do have these type of conversations to support us, me, the user.

And BTW: thank you Alexander for your time and effort supporting open source projects!

Revision history for this message
In , Akurtakov (akurtakov) wrote :

(In reply to comment #28)
> Hi Alexander,
>
> Yes, I know it's an open source one, and I realize that this is the death of
> the open source world: pointing at each other all the time. If you report a bug
> at Unity/Ubuntu, they point at this bug report. If you report it here, you say
> it's their fault, they should fix it!
>
> See, my point is: from my perspective, I don't give a flying damn who's fault
> is it. It's a bug that has been reported and confirmed for 1.5 years.
>
> It's so sad to see that all those talented people who are willing to contribute
> their efforts to these projects just want to create another 'world changing'
> project instead of solving the problems right here. Why bother with Netbeans,
> let's fix Eclipse. Oh, Eclipse got problems too, let's deal with jEdit. Oh,
> jEdit sucks too, let's...

I feel your pain. It's even worse when you have to deal with the libraries this applications use.

>
> I wish you'd charge $5 for every open source project. I wish you'd support it.
> I wish I could rely on you and your supported project.

Well, there are a number of supported Eclipse variations. If you contact me offlist I would point you to few. But having support means that there are a number of limitations enforced to the users as noone can support every possible combination and it looks like noone has a paid supports for Eclipse on Unity as there are no fixes.

>
> I simply do not need 15 faulty Java IDEs. Nor need many version of Java
> runtime. I need one, that works and that is more than enough!
>
> But now, what choices do I have? I have to opt out from Ubuntu as it's got
> severe, unresolved, "it's not my fault" type of bugs. Should I buy Apple? Oh,
> well, JDK 1.7 is not fully supported. Moving forward... Guess which platform is
> fully supported?

Well, a bit of googling will help you find a what of interesting info about who is working on what so you can make an informed decision about choosing the distribution.

>
> Anyway, please don't tell me that it has been hard for any Eclipse
> devs/architects to chase down a Ubuntu dev/architect while having a beer: hey,
> we need to fix it! Oh, well, I'll do it, it takes only 15 minutes or,
> whatever...

This is the point, there are always more things to fix/improve than installing a new OS to try reproducing a problem you don't see on yours. This is not a 15 minutes for me.
>
> Or if this conversation is impossible, I'd strongly suggest abandoning any open
> source projects and supporting only licensed ones - they can and do have these
> type of conversations to support us, me, the user.

The conversation is possible but every such conversation needs at least one interested party. And as can be seen from the bug report no Eclipse developers seems to care about Unity nor Unity devs care about Eclipse. If there was someone intereseted it would have been fixed long ago and it will stay this way until such an interested person appears.

>
> And BTW: thank you Alexander for your time and effort supporting open source
> projects!
Thanks for these words.

Revision history for this message
In , Luis Fernando Planella Gonzalez (luisfpg) wrote :

For now, it seems that the problem is in libdbusmenu (Unity side).
Eclipse is blacklisted in a binary file in libdbusmenu, so the menu is always on the application. There is no friendly way to remove it from the blacklist, but there is a workaround which involves editing the binary file here: https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/618587/comments/46
I've reported https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/890294 to remove Eclipse from the blacklist, but no one did it so far.
I think the best way to help here is to test the workaround with all menu functions and insist on that last bug report I've mentioned, maybe even sending a patch for it (I think it should be an one-liner).

Revision history for this message
In , Hceylan (hceylan) wrote :

Adam,

What you say is true not only for open source projects, but also closed source / paid applications, even you can make the same argument for your car.

On the other hand eclipse is there, every missing part is an opportunity to make some money, if you think all IDEs sucks including eclipse pick the best open source one you like and fork it, and get rich over people like you.

There are always urgency and importance in every job. For some time eclipse devs have been working hard to prepare eclipse 4.0, which is just around the corner.

On the other hand if you spent the time to read the comments you spent on writing the message, you would find that I proposed a simple workaround for now. Just remove the application and run it as application.

Last but not the least, rather then storming like this, you go in fix it and you're done. If you cannot you still can hire someone to fix unity and / or eclipse together and give back.

That is the spirit people wants to keep here not yours.

Revision history for this message
Honghe Wu (honghe) wrote :

with the hack of #46, I get the global menu of Eclipse back in Ubuntu 12.04.
But I don't understand why Ubuntu do this blacklist.

Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :

Reading the above, I get the impression that the blacklisting does not get undone because the menu still doesn't work perfectly.

I hacked my library as described in #46 above, then tried out Indigo. The menu seems to integrate into the global menu bar and into the HUD menu.

* Shortcut keys don't work

I did a brief experiment ; alt+<key> seems to open the top level menu, and then a shortcut key without alt will select the relevant menu item. This also works for nested menu items. This appears to behave no differently to the normal SWT shell menu.

So I'm not sure what the issue is here..

* Arrow keys don't work properly

Navigating into submenus with arrow keys doesn't seem to work properly. The first keypress is consumed and the highlight remains in the parent menu. The second keypress seems to work.

This fault is not mentioned above, this is just something that I have noticed today while experimenting. This is of a lesser concern to me because I rarely navigate menus with arrow keys any more - especially the gargantuan menus that Eclipse has.

* Dynamically constructed menus don't work properly

The comments above seem to indicate that this is fixed.

----

It seems what really needs to happen is for someone in the Eclipse packaging team, or someone trusted by the Eclipse packaging team, to perform the hack above, test the menu (to their satisfaction). Since I was able to find one (apparently previously undiscovered) bug in the menu after about 2 minutes of testing, this would seem to require work to fix. Although the problem I found doesn't affect me because of my menu use, I know that it will inevitably annoy someone.

I can see why libappmenu doesn't read it's blacklist from a config file - because previously blacklisted apps might remain blacklisted, even after problems were fixed and removed from the list, because config files could remain. Instead, how about a whitelist as a config file ; those of us who want to accept the minor problems that using the global menu produces can override the blacklist, and should the problems be fixed and the internal blacklist entry be removed, we will be unaffected (apart from things working better), while everyone else gains another app that works with global menus.

Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :

After some testing with Eclipse removed from the appmenu blacklist, I can add that currently (in latest versions on Precise) the dynamically constructed menu can re-order the top menu bar ; e.g

Sometimes the menu changes to

  Refactor Navigate File Edit Source Search Project Run Window Help

Instead of

  File Edit Source Refactor Navigate Search Project Run Window Help

A workaround appears to be to put focus in another window and return to Eclipse, which rebuilds the menu in the correct order.

Revision history for this message
In , Filip-wieladek (filip-wieladek) wrote :

One can get this to work.

This seems to work correctly on my set up (I am using Kubuntu 12.04 with the KDE version of appmenu (which uses the same library as Unity as far as I know).

After a clean install for Eclipse 3.8, this does not work, but after changing the eclipse.ini to my default settings, it started working. Unfortunately, I do now know which setting fixes the issue.

Here is my Eclipse.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813
-vm
/home/fwi/Applications/java/jdk7_01-x64/jdk1.7.0_01/bin/java
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-pluginCustomization
/home/fwi/Workspace/defaults-1.epf
--launcher.XXMaxPermSize
1024m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms3G
-Xmx3G
-XX:+UnlockExperimentalVMOptions
-XX:PermSize=512m
-XX:MaxPermSize=1024m
-XX:MaxHeapFreeRatio=70
-XX:+CMSIncrementalPacing
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
-XX:ParallelGCThreads=2
-Dcom.sun.management.jmxremote
-Xverify:none

1 comments hidden view all 114 comments
Revision history for this message
Josh Chia (xieliming) wrote :

I tried the hack from post #46, it doesn't work for me unfortunately :(
However oddly enough, if I run eclipse with the -clean parameter it does work... I'm not sure why this, any insights?
FYI I'm running Ubuntu 12.04 on a eeePC 1000HE (Eclipse 4.2)

Revision history for this message
Josh Chia (xieliming) wrote :

Hm actually I did some further testing, by editing the .desktop file and removing UBUNTU_MENUPROXY=0 from Exec fix the problem with the hack in #46. Please ignore any issue with -clean. Thanks

4 comments hidden view all 114 comments
Revision history for this message
In , Markus-keller (markus-keller) wrote :

(In reply to comment #33)
> One can get this to work.

Beware: Expect some weirdness if you start Eclipse with a product that cannot be found, e.g.:

-product
no.valid.product

Some key bindings don't work (Navigate > Show In, Alt+Shift+W), and these messages on the console also don't look promising:

(SWT:25413): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed

Revision history for this message
In , Mickael Istria (mistria) wrote :

This issue is definitely not an Eclipse one, but an Ubuntu one. Ubuntu hardcoded an exception for Eclipse menu in there menu manager.
This exception can be removed on the Ubuntu side by tweak linked earlier by Luis Fernando: https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/618587/comments/46 It's working correctly as far as I've used Eclipse for the last few days.

Also note that Ubuntu menu are used for other RCP applications that are not titled "Eclipse".

For further better integration of Eclipse into Ubuntu, follow this Ubuntu ticket: https://bugs.launchpad.net/ubuntu/+source/appmenu-gtk/+bug/865389 and help it to get merged into Ubuntu.

If some error specific to Eclipse happen in Ubuntu after this ticket is fixed, or with already existing other RCP applications, then please open other tickets specific to these issues.

4 comments hidden view all 114 comments
Revision history for this message
Adrian Wilkins (adrian-wilkins) wrote :

The most recent version breaks the workaround in #46 - the library file (on a 64-bit system) has moved to

 /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/menuproxies/libappmenu.so

Revision history for this message
Wiktor: Nizio (zap-4) wrote :

I can confirm that #91 works, Ubuntu 12.10 (64-bit system) with Eclipse Juno.

Please note that no hack is required with the Eclipse version distributed with Android SDK (http://developer.android.com/sdk/index.html), which is probably Eclipse 3.7.2. It works out of the box.

In about 50% cases Eclipse Juno doesn't display icons in the toolbar correctly right after start. (Only the uppert parts of the icons are displayed), so I have to refresh the view manually.

Revision history for this message
Daniele Cruciani (daniele-smartango) wrote :

http://stackoverflow.com/questions/14130624/eclipse-and-pdt-i-can-not-type-f-letter-anymore
something related to #72 and other comments. Key binding in main menu changed and editor do not work, in fact context menu report the right binding. I had to revert with

cd /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/menuproxies
sudo sed -i 's/Xclipse/Eclipse/' libappmenu.so

Here ubuntu 12.10, and eclipse 3.8 (ubuntu default repository), 64bit.

To be fair this does not look as as solution, at least not if you are using PDT, or it is a pdt-incompatible solution, for now

I can do tests and post configuration, just ask

3 comments hidden view all 114 comments
Revision history for this message
In , Pascal-rapicault (pascal-rapicault) wrote :

Is this issue expected to be fixed on Ubuntu 12.04?
I'm trying the most recent I build from eclipse 4.3 and I'm still getting the same error.

Revision history for this message
In , Pascal-rapicault (pascal-rapicault) wrote :

ok, after all it seems to work. Yet I still get a bunch of errors in my log.

3 comments hidden view all 114 comments
Revision history for this message
Sebastian W. (yodamin) wrote :

I can not confirm that #91 works.
System: Ubuntu 12.10 (64-bit system) with Eclipse Juno (4.2.2)

Is there any hope left that this bug gets fixed in this year? It is really annoying when I have to work with a laptop.

Changed in eclipse:
status: Confirmed → Unknown
4 comments hidden view all 114 comments
Revision history for this message
Willy VVu (willy-vvu) wrote :

Just to add, when finding and replacing all instances of Eclipse to Xclipse in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/menuproxie/libappmenu.so, the app menu appears to be fixed, but every time f is pressed, Eclipse formats code instead of typing in an f.

Revision history for this message
Mystic-Mirage (mystic-mirage) wrote :

I created package eclipse-globalmenu for patching libappmenu.so (see #46).
Package contains dpkg triggers so patch will be automatically applied to libappmenu.so on every appmenu-gtk update.

Supported appmenu-gtk from precise-updates and above (uses new file place - see #91). Tested on Raring i386 and x86_64.

https://launchpad.net/~mystic-mirage/+archive/eclipse-globalmenu

Revision history for this message
Elvis Dominguez (elvisd79) wrote :

@Mystic-Mirage: I'm not a package-expert, but sounds cool. One of the biggest problems was that on every appmenu gtk everything was lost.

Revision history for this message
Sebastian W. (yodamin) wrote :

On the new eclipse version (Kepler), this patch doesn't seem to work for me :-(
Has anybody else yet changed to Kepler?

Revision history for this message
Mystic-Mirage (mystic-mirage) wrote :

I have tested Kepler today. The patch is working for me.

Revision history for this message
Sebastian W. (yodamin) wrote :

Thank you :-)

I somehow managed to remove the complete global menu bar. In case somebody else experienced this, you need those packages:
appmenu-gtk indicator-applet-appmenu indicator-appmenu

@Mystic-Mirage: Sorry for the inconvenience and your package is great!

Revision history for this message
Stephan Henningsen (zta77) wrote :

So the patch is working, and it makes Eclipse behave like applications are supposed to in Ubuntu. Great work, thanks. Then why hasn't the patch been included in the Ubuntu repository, and the Eclipse package made depend on it? Or the patch implemented somehow else? The fix itself has been around for years!

Why do Ubuntu+Eclipse users *still* have to search the web, find this report, and install unofficial repos and unofficial packages or hack a buggy blacklist to get things working?

PLEASE FIX THIS BUG.

Revision history for this message
In , Martin Oberhuber (martin-oberhuber) wrote :

(In reply to comment #34)
> Some key bindings don't work (Navigate > Show In, Alt+Shift+W), and these
> messages on the console also don't look promising:
>
> (SWT:25413): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion
> `GTK_IS_MENU_SHELL(menu)' failed

I also see lots of those assertions, and none of the icons appear in any menu (regardless of whether I use the "appmenu" global menu or not).

Does anybody have information about these issues, ie how to get Eclipse to work perfectly well on Ubuntu ?

Revision history for this message
Lukas Raska (lukasraska) wrote :

eclipse is missing menu items in ubuntu 13.10, workaround is UBUNTU_MENUPROXY= /path/to/eclipse/eclipse

Revision history for this message
Ismayilzadeh Zulfugar (su-nami) wrote :

I'm using Aptana, Titanium IDE (which build on Eclipse). I also have same problem. Only "Window" partially works.
screenshot:
http://i.stack.imgur.com/EFyu2.jpg
http://i.stack.imgur.com/qThTi.jpg

Revision history for this message
Lukasz Strzelecki (lukastrz-b) wrote :

I have the same problem as in #108. I am using Springsource Tool Suite (built on eclipse rcp).
Workaroud is to run "export UBUNTU_MENUPROXY= 0 && ./STS" it is nasty (as it moves menu out from top bar) but at least menu is useable.

Revision history for this message
Christian Amann (camann9) wrote :

Same problem as in #108, using a standard Eclipse (http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz)
Version: Kepler Service Release 1
Build id: 20130919-0819
The problem appeared after switching to Ubuntu 13.10. Fix is in #109 but it's very ugly...

Revision history for this message
In , Mickael Istria (mistria) wrote :

Yes another Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/1208019
It looks like the Ubuntu global menu is too buggy/limited to play nicely with Eclipse in some circumstances. So the workaround is to not use it.
However, this will cause an issue with GTK3 implementation in Ubuntu: bug 417601

Ubuntu is definitely not standard-friendly enough to guarantee perfect integration with Eclipse.

tags: added: trusty
Revision history for this message
In , Michael Vorburger (mike-vorburger) wrote :

Now tracked in https://bugs.eclipse.org/bugs/show_bug.cgi?id=419830.

The "env UBUNTU_MENUPROXY=0 ./eclipse" from above is a viable short-term work-around.

Revision history for this message
vtec (vitekcvachoucek) wrote :

I have run a debugging session from the Eclipse side. When you click the global menu it is producing event that gets handed down to the main SWT loop, there Eclipse takes the event and gives it back to GTK calling gtk_main_do_event for precise targeting of the affected component. Without the global menu the event would popout back from GTK inside the Menu widget triggering something like menuIsAboutToShow callback. With global menu however the event is swallowed and never comes back.

The Java code in Eclipse has no role here nor the super-thin SWT native code. It an apparent regression in the behavior of the GTK library. In other words it is Ubuntu global menu back not being compatible with standard GTK behavior.

Revision history for this message
In , Rupert-thurner-9 (rupert-thurner-9) wrote :

(In reply to Paul Webster from comment #21)
> (In reply to comment #20)
> > Is there a way to get RCP to also use setAccelerator whenever it sets shortcut
> > labels? That would ensure that menu items work correctly.
>
> RCP and Eclipse SDK use a KeyDown filter to process key shortcuts. We have
> multi-keystroke shortcuts and shortcuts for behaviour not in the menus
> directly.
>
> But even for some more standard accelerators (CTRL+Y or ALT+/) the system
> has to dispatch to a handler based on a number of factors, including which
> part is active, what's the selection, etc. Using setAccelerator(*) would
> fire the Selection for that MenuItem, producing the wrong executing in about
> half of the Eclipse SDK cases.

what is a practical solution to make a global menu work then?

Mathew Hodson (mhodson)
affects: audacity → unity-gtk-module
Displaying first 40 and last 40 comments. View all 114 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.