Examples of MenuFinder


Examples of net.sf.swtbot.finder.MenuFinder

   * @param reference the view reference.
   * @throws WidgetNotFoundException if the widget is <code>null</code> or widget has been disposed.
   */
  public SWTBotView(IWorkbenchPartReference reference) throws WidgetNotFoundException {
    super(findWidget(reference, new Finder(new ControlFinder(new EclipseDefaultChildrenResolver(), new EclipseDefaultParentResolver()),
        new MenuFinder())));
    view = reference;
  }
View Full Code Here

Examples of net.sf.swtbot.finder.MenuFinder

  /**
   * Constructs an eclipse bot.
   */
  public SWTEclipseBot() {
    super(new ControlFinder(new EclipseDefaultChildrenResolver(), new EclipseDefaultParentResolver()), new MenuFinder());
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

    final Matcher<? extends Widget> matcher = withMnemonic(menuName);
    MenuItem menuItem = syncExec(new WidgetResult<MenuItem>() {
      public MenuItem run() {
        Menu bar = widget.getMenu();
        Matcher<MenuItem> withMnemonic = withMnemonic(menuName);
        List<MenuItem> menus = new MenuFinder().findMenus(bar, withMnemonic, true);
        if (!menus.isEmpty())
          return menus.get(0);
        return null;
      }
    });
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

  public String getFailureMessage() {
    return "Could not find a menu within the shell '" + shell + "' matching '" + matcher + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  }

  protected List<MenuItem> findMatches() {
    return new MenuFinder().findMenus(shell.widget, matcher, true);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

  public String getFailureMessage() {
    return "Could not find a menu within the shell '" + shell + "' matching '" + matcher + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  }

  protected List<MenuItem> findMatches() {
    return new MenuFinder().findMenus(shell.widget, matcher, true);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

  public SWTBotMenu menu(final String menuName) throws WidgetNotFoundException {
    final Matcher<? extends Widget> matcher = withMnemonic(menuName);
    MenuItem menuItem = syncExec(new WidgetResult<MenuItem>() {
      public MenuItem run() {
        Menu bar = widget.getMenu();
        List<MenuItem> menus = new MenuFinder().findMenus(bar, withMnemonic(menuName), true);
        if (!menus.isEmpty())
          return menus.get(0);
        return null;
      }
    });
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

  /**
   * Constructs a bot.
   */
  public SWTBot() {
    this(new ControlFinder(), new MenuFinder());
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

   * Constructs a bot that will match the contents of the given parentWidget.
   *
   * @param parent the parent
   */
  public SWTBot(Widget parent) {
    this(new ChildrenControlFinder(parent), new MenuFinder());
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

  /**
   * Constructs a bot.
   */
  public SWTBotFactory() {
    this(new ControlFinder(), new MenuFinder());
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder

  public String getFailureMessage() {
    return "Could not find a menu within the shell '" + shell + "' matching '" + matcher + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  }

  public boolean test() throws Exception {
    allMenuItems = new MenuFinder().findMenus(shell.widget, matcher, true);
    return !allMenuItems.isEmpty();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.