Bug 315281 update copyrights for 3.6
tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/ActionUtil.java
for (int nX = 0; nX < items.length; nX++) {
            IContributionItem item = items[nX];
            if (item instanceof SubContributionItem)
                item = ((SubContributionItem) item).getInnerItem();
            if (item instanceof ActionContributionItem) {
                IAction action = ((ActionContributionItem) item).getAction();
                if (label.equals(action.getText())) {
                    return action;
                }
            }
        }
        return null;
    }
    /**
     * Fire the "handleAboutToShow" method in a menu manager.
     * This triggers the same behavior as when a user opens a menu.
     * The menu to be populated with actions and those 
     * actions to be enacted in SWT widgets.
     * 
     * @param mgr the menu manager to open
     */
    public static void fireAboutToShow(MenuManager mgr) throws Throwable {
        Class clazz = mgr.getClass();
        Method method = clazz.getDeclaredMethod("handleAboutToShow",
                new Class[0]);
        method.setAccessible(true);
        method.invoke(mgr, new Object[0]);
    }
}