Eclipse Mars 4.5 不触发菜单贡献

Menu contribution not triggering with Eclipse Mars 4.5

我为使用 RCP Luna 4.4.2 的应用程序所做的菜单贡献过去工作正常,但最近迁移到 Eclipse 4.5 让我认为它们可能一开始就没有正确实现。动态菜单处理程序中的代码如下:

@AboutToShow
void aboutToShow(List<MMenuElement> items, ...) {
    ....
    MDirectMenuItem item = MMenuFactory.INSTANCE.createDirectMenuItem();
    item.setContributionURI("bundleclass://blablabla/x.y.z.Foobar");
    item.setLabel("labelX");
    items.add(item);
    ...

菜单项显示正常。它没有变灰。单击后,@Execute 注释的处理程序方法 Foobar.execute() 不会用 4.5 调用(它是用 4.4.2 调用的)。上面的代码有什么错误或遗漏吗?

这个错误是在 Mars 的初始版本(4.5 版)中引入的。 https://bugs.eclipse.org/bugs/show_bug.cgi?id=469581

正在讨论

已创建补丁,请参阅https://git.eclipse.org/r/50322

看来该修复程序将在 Mars SR1 (4.5.1) 中发布,计划于 2015 年 9 月 25 日发布。