Bug 516261 - EModelService cannot find menus
Summary: EModelService cannot find menus
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows NT
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-05 12:23 EDT by Espinosa CZ CLA
Modified: 2021-05-18 03:38 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Espinosa CZ CLA 2017-05-05 12:23:57 EDT
According to bug 383403, which is marked as VERIFIED FIXED, fixed back in 2014.
But it's May 2017 now, Eclipse Neon.SP3, and EModelService still cannot find any menus!? Am I doing something wrong?

@Inject
EModelService modelService;

@Inject
MApplication application;

@Inject 
MPart thisPart;

List<?> x = modelService.findElements(application, null, MPopupMenu.class, null);
// returns empty list

List<?> x = modelService.findElements(application, null, MMenu.class, null);
// returns empty list
// and I do have couple of menus in the the model on several levels


List<?> x = modelService.findElements(application, "org.bitbucket.espinosa.efm.part.dircontent.ctxmenu", null, null);
// returns empty list
// the ID definitively exists

List<?> x = modelService.findElements(thisPart, null, MPopupMenu.class, null);
// returns empty list


List<?> x = modelService.findElements(thisPart, "org.bitbucket.espinosa.efm.part.dircontent.ctxmenu", null, null);
// returns empty list

List<?> x = thisPart.getMenus();
// this finally returns my menus including "org.bitbucket.espinosa.efm.part.dircontent.ctxmenu"



Eclipse IDE for Java Developers
Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500
Comment 1 Denis Forveille CLA 2019-03-14 21:16:24 EDT
Same problem for me
Eclipse IDE for RCP and RAP Developers v2018-12 (4.10.0)
Comment 2 Denis Forveille CLA 2019-03-14 21:21:33 EDT
Also the commit associated to bug #383403 includes a new "findHandlers(..)" method which is not present in v4.10...
So it seems that assumption from @Espinosa CZ may be right. As the code for this bug been applied to eclipse?
Comment 3 Christian Pontesegger CLA 2019-05-27 05:57:22 EDT
Tried to find the main menu using

EModelService.find("org.eclipse.ui.main.menu", myApplication)

on a 2019.03 target platform. Does not work.
Comment 4 Eclipse Genie CLA 2021-05-17 07:23:18 EDT
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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 5 Christian Pontesegger CLA 2021-05-18 03:38:11 EDT
still a valid request. Genie is not doing a good job closing valid issues.