| Summary: | public void menuShown method is not working for addMenuListener | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Dharmang <dharmang.khant> |
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, remy.suen |
| Version: | 4.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
(In reply to comment #0) > I tried the above code and it never calls the "public void menuShown(MenuEvent > arg0)" method. Menu bars are only ever shown once. (In reply to comment #1) > (In reply to comment #0) > > I tried the above code and it never calls the "public void menuShown(MenuEvent > > arg0)" method. > Menu bars are only ever shown once. Then what is the perpose of adding the method in Listner..? I want to change the name of My Menu Item on selecting the parent menu. What should I do? (In reply to comment #2) > Then what is the perpose of adding the method in Listner..? Other menus can be shown repeatedly (think "dropdown" and popup menus). > I want to change the name of My Menu Item on selecting the parent menu. What > should I do? Please ask your question on the forums. http://www.eclipse.org/forums/ This is not a bug. Please ask questions on the forum/newsgroup. Closing as INVALID. |
Build Identifier: Eclipse 3.6 IWorkbench workbench = Activator.getDefault().getWorkbench(); //PlatformUI.getWorkbench(); Menu menubar = workbench.getActiveWorkbenchWindow().getShell().getMenuBar(); menubar.addMenuListener(new MenuListener() { @Override public void menuShown(MenuEvent arg0) { } @Override public void menuHidden(MenuEvent arg0) { } }); I tried the above code and it never calls the "public void menuShown(MenuEvent arg0)" method. Reproducible: Always