Bug 473456 - [Cocoa] SWT Push Menu on Menubar is not working on MAC
Summary: [Cocoa] SWT Push Menu on Menubar is not working on MAC
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: Macintosh Mac OS X
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2015-07-24 03:44 EDT by Ashish Sharma CLA
Modified: 2020-01-24 00:18 EST (History)
4 users (show)

See Also:


Attachments
Snippet (3.47 KB, application/x-zip-compressed)
2015-07-27 08:09 EDT, Ashish Sharma CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ashish Sharma CLA 2015-07-24 03:44:44 EDT
I have a project that uses SWT menus. Menus are working fine on Windows but when deployed on MAC, Selection Event is not getting fired. 

It is  Eclipse Mars and JDK is from Sun. Version 1.8-0.4.5 and Mac is 10.9.5. In eclipse ini , we also have -XstartOnFirstThread.

Pls find below the libraries included

org.eclipse.osgi_3.10.100.v20250529-1857.jar
org.eclipse.core.commands_3.7.0.v20150422-0725.jar
org.eclipse.equinox.common_3.7.0.v20150402-1709.jar
org.eclipse.equinox.registery_3.6.0.v20150318-1503.jar
org.eclipse.core.runtime_3.11.0.v20150405-1723.jar
org.eclipse.core.databinding_1.5.0.v20150422-0725.jar
org.eclipse.core.databinding.property_1.4.200.v20140214-0004.jar
org.eclipse.core.databinding.observable_1.4.1.v20140210-1835.jar
org.eclipse.text_3.5.400.v20150505-1044.jar
org.eclipse.jface_3.11.0.v20150602-1400.jar
org.eclipse.jface.text_3.10.0.v20150603-1752.jar
org.eclipse.jface.databinding_1.6.200.v20140528-1422.jar
org.eclipse.ui.workbench_3.107.0.v20150510-1732.jar
com.ibm.icu_54.1.1.v201501272100.jar
org.eclipse.ui.forms_3.6.200.v20150506-2029.jar
org.eclipse.swt_3.104.0.v20150528-0211.jar
org.eclipse.swt.cocoa.macosx.x86_64_3.104.0.v20150528-0211.jar

Pls help. 

-TIA
Comment 1 Lakshmi P Shanmugam CLA 2015-07-27 02:23:25 EDT
Can you provide an example snippet to reproduce the problem?
For eg: I tried with Snippet133 [1] and Eclipse 4.5, Menu selection works fine.

[1] - http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.java
Comment 2 Lakshmi P Shanmugam CLA 2015-07-27 07:11:12 EDT
I tested on Eclipse 4.5, OSX 10.9.5 and jdk1.8.0_45. 
Please try to provide a testcase to reproduce the problem
Comment 3 Ashish Sharma CLA 2015-07-27 08:09:39 EDT
Created attachment 255451 [details]
Snippet

PFA the snippet
Comment 4 Ashish Sharma CLA 2015-07-27 08:12:09 EDT
(In reply to Lakshmi Shanmugam from comment #2)
> I tested on Eclipse 4.5, OSX 10.9.5 and jdk1.8.0_45. 
> Please try to provide a testcase to reproduce the problem


Thanks for your response, Lakshmi.

Mine is Eclipse Mars.

I am attaching two files. MWTAPP.java & MonitorList.java. MWTAPP has a menu and on Select monitorlist should be opened. 

-thks for help
Comment 5 Ashish Sharma CLA 2015-07-31 01:55:19 EDT
Can you pls update me on the progress? -thks
Comment 6 Ashish Sharma CLA 2015-08-03 01:50:07 EDT
Need your help on urgent basis. My client is giving me hard time.  Pls help.
Comment 7 Lakshmi P Shanmugam CLA 2015-08-03 04:48:55 EDT
(In reply to Ashish Sharma from comment #4)
> (In reply to Lakshmi Shanmugam from comment #2)
> > I tested on Eclipse 4.5, OSX 10.9.5 and jdk1.8.0_45. 
> > Please try to provide a testcase to reproduce the problem
> 
> 
> Thanks for your response, Lakshmi.
> 
> Mine is Eclipse Mars.
> 
> I am attaching two files. MWTAPP.java & MonitorList.java. MWTAPP has a menu
> and on Select monitorlist should be opened. 
> 
> -thks for help

I tried the attached Snippet. The snippet creates a SWT.PUSH MenuItem on the Menubar and Selection event is not fired on the item.
This seems like a bug as it works fine on Windows and it requires further investigation.

Using a SWT.CASCADE MenuItem instead and creating a SWT.DROPDOWN Menu with the items should work fine.
Comment 8 Eclipse Genie CLA 2020-01-03 19:00:19 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 9 Dani Megert CLA 2020-01-04 03:29:42 EST
Lakshmi, is this still an issue?
Comment 10 Lakshmi P Shanmugam CLA 2020-01-08 05:40:50 EST
(In reply to Dani Megert from comment #9)
> Lakshmi, is this still an issue?

Yes Dani.
Comment 11 Con Cunningham CLA 2020-01-22 17:46:08 EST
(In reply to Dani Megert from comment #9)
> Lakshmi, is this still an issue?

Hi, I have this issue, I create a new SWT Application, attach a MenuBar, run, and no Menu Bar appears. I did notice in the preview in design mode that the menu bar appears ABOVE the main shell. Versions are:

macOS Catalina 10.15.2

Eclipse IDE for Java Developers

Version: 2019-03 (4.11.0)
Build id: 20190314-1200
Comment 12 Con Cunningham CLA 2020-01-22 17:52:52 EST
I forgot to mention, I am using the Gerrit fix, because all of my preview was mirror-imaged otherwise.
Comment 13 Con Cunningham CLA 2020-01-23 09:20:09 EST
(In reply to Dani Megert from comment #9)
> Lakshmi, is this still an issue?

Hi Dani, I don't know if you are working on this, but if you are, perchance, I have noticed one more thing. If I create a simple JFace app, with a MenuBar and one (File) option, when I run it, the File option actually gets added to the Main macOS Menu bar.
Comment 14 Lakshmi P Shanmugam CLA 2020-01-24 00:18:32 EST
(In reply to Con Cunningham from comment #11)
> (In reply to Dani Megert from comment #9)
> > Lakshmi, is this still an issue?
> 
> Hi, I have this issue, I create a new SWT Application, attach a MenuBar,
> run, and no Menu Bar appears. I did notice in the preview in design mode
> that the menu bar appears ABOVE the main shell. Versions are:
> 
> Hi Dani, I don't know if you are working on this, but if you are, perchance,
> I have noticed one more thing. If I create a simple JFace app, with a
> MenuBar and one (File) option, when I run it, the File option actually gets
> added to the Main macOS Menu bar.

Hi, Looks like these are different issues from the original problem in the bug. I didn't understand the problems you are seeing. Can you please open a new bug and provide a snippet and screenshot showing the problem?