Java 类org.eclipse.jface.action.IMenuListener2 实例源码

项目:swt-widgets    文件:MenuManagerEx.java   
/**
 * Notifies any menu listeners that a menu is about to hide. Only listeners
 * registered at the time this method is called are notified.
 *
 * @param manager
 *          the menu manager
 *
 */
private void fireAboutToHide(IMenuManager manager) {
  final Object[] listeners = this.listeners.getListeners();
  for (final Object listener : listeners) {
    if (listener instanceof IMenuListener2) {
      final IMenuListener2 listener2 = (IMenuListener2) listener;
      listener2.menuAboutToHide(manager);
    }
  }
}
项目:Pydev    文件:MenuManagerCopiedToAddCreateMenuWithMenuParent.java   
/**
 * Notifies any menu listeners that a menu is about to hide.
 * Only listeners registered at the time this method is called are notified.
 *
 * @param manager the menu manager
 *
 */
private void fireAboutToHide(IMenuManager manager) {
    final Object[] listeners = this.listeners.getListeners();
    for (int i = 0; i < listeners.length; ++i) {
        final Object listener = listeners[i];
        if (listener instanceof IMenuListener2) {
            final IMenuListener2 listener2 = (IMenuListener2) listener;
            listener2.menuAboutToHide(manager);
        }
    }
}