Menu 如何在EclipseRCP的子窗口菜单之后添加自定义菜单?

Menu 如何在EclipseRCP的子窗口菜单之后添加自定义菜单?,menu,eclipse-plugin,eclipse-rcp,Menu,Eclipse Plugin,Eclipse Rcp,我有一个子菜单下的“窗口”菜单,我想添加我的自定义菜单下 我可以使用menuContribution的位置uri:menu:Window?after=additions在“窗口”菜单下添加自定义菜单 问题是,在ActionBarAdvisor类上生成的子菜单使用以下行 @Override protected void fillWindowMenu(IMenuManager windowMenu) { IWorkbenchWindow window = getActionBarConfig

我有一个子菜单下的“窗口”菜单,我想添加我的自定义菜单下

我可以使用menuContribution的位置uri:menu:Window?after=additions在“窗口”菜单下添加自定义菜单

问题是,在ActionBarAdvisor类上生成的子菜单使用以下行

@Override
protected void fillWindowMenu(IMenuManager windowMenu) {
    IWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();

    windowMenu.add(new GroupMarker(IWorkbenchActionConstants.WB_START));

    IMenuManager perspectiveMenu = new MenuManager(
            lineer.toplulastirma.Messages.ToplulastirmaActionBarAdvisor_4,
            ContributionItemFactory.PERSPECTIVES_SHORTLIST.getId());
    perspectiveMenu.add(ContributionItemFactory.PERSPECTIVES_SHORTLIST.create(window));
    windowMenu.add(perspectiveMenu);

    IMenuManager viewMenu = new MenuManager(lineer.toplulastirma.Messages.ToplulastirmaActionBarAdvisor_5,
                ContributionItemFactory.VIEWS_SHORTLIST.getId());
    viewMenu.add(ContributionItemFactory.VIEWS_SHORTLIST.create(window));
    windowMenu.add(viewMenu);
    windowMenu.add( new Separator());
}
所以我不知道如何访问它的id来编辑我的LocationURI

我试过这些:

菜单:window?after=lineer.toplulastirma.Messages.ToplulastirmaActionBarAdvisor_5

菜单:lineer.toplulastirma.Messages.toplulastirmationbaradvisor_5?after=添加

菜单:查看菜单?之后=添加

菜单:window?after=viewMenu


它们不起作用。

你能发布这段代码的全部方法吗?这将使您更容易理解您试图做的事情