public ShellMenu(final Matcher<String>... matchers) { this.matchers = matchers; setMacOsMenuProperties(); if (!isSubmenuOfMacEclipseMenu) { MenuLookup ml = new MenuLookup(); menuItem = ml.lookFor(ml.getActiveShellTopMenuItems(), matchers); } }
@Override public String getText() { if (!isSubmenuOfMacEclipseMenu) { MenuLookup ml = new MenuLookup(); MenuItem i = ml.lookFor(ml.getActiveShellTopMenuItems(), matchers); String text = ml.getMenuItemText(i); return text; } else { return "&" + macEclipseMenuCommand.text; } }