Package net.sf.swtbot.finder

Examples of net.sf.swtbot.finder.Finder


   *
   * @param controlFinder the {@link ControlFinder} used to identify and find controls.
   * @param menuFinder the {@link MenuFinder} used to find menu items.
   */
  public SWTBot(ControlFinder controlFinder, MenuFinder menuFinder) {
    this(new Finder(controlFinder, menuFinder));
  }
View Full Code Here


  /**
   * @see net.sf.swtbot.eclipse.finder.widgets.SWTBotView#findWidget(int)
   */
  protected Widget findWidget(int index) throws WidgetNotFoundException {
    Widget findWidget = findWidget(view, new Finder(new ChildrenControlFinder(super.findWidget(index)), new MenuFinder()));
    return getEditor((Composite) findWidget);
  }
View Full Code Here

   * @throws ClassCastException Thrown if the reference is not an {@link IViewReference}.
   * @deprecated This has been replaced with the <code>SWTBotView(IViewReference reference)</code> constructor. If the
   *             passed in reference can not be cast it will throw a {@link ClassCastException}.
   */
  public SWTBotView(IWorkbenchPartReference reference) throws WidgetNotFoundException, ClassCastException {
    super(findWidget(reference, new Finder(new ControlFinder(new EclipseDefaultChildrenResolver(), new EclipseDefaultParentResolver()),
        new MenuFinder())));

    view = reference;
  }
View Full Code Here

   * @param reference the view reference.
   * @throws WidgetNotFoundException if the widget is <code>null</code> or widget has been disposed.
   * @since 1.2
   */
  public SWTBotView(IViewReference reference) throws WidgetNotFoundException {
    super(findWidget(reference, new Finder(new ControlFinder(new EclipseDefaultChildrenResolver(), new EclipseDefaultParentResolver()),
        new MenuFinder())));

    view = reference;
  }
View Full Code Here

  public AbstractSWTBot(Widget w) throws WidgetNotFoundException {
    if (w == null)
      throw new WidgetNotFoundException("The widget was null.");
    if (w.isDisposed())
      throw new WidgetNotFoundException("The widget was disposed." + SWTUtils.toString(w));
    finder = new Finder(new ControlFinder(), new MenuFinder());
    widget = w;
    display = w.getDisplay();
    log = Logger.getLogger(getClass());
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found.
   */
  public SWTBotMenu contextMenu(String text) throws WidgetNotFoundException {
    if (widget instanceof Control) {
      Control control = (Control) widget;
      return new SWTBotMenu(new Finder(finder, new ContextMenuFinder(control)), text);
    }
    throw new WidgetNotFoundException("Could not find menu: " + text);
  }
View Full Code Here

  public AbstractSWTBot(Widget w) throws WidgetNotFoundException {
    if (w == null)
      throw new WidgetNotFoundException("The widget was null.");
    if (w.isDisposed())
      throw new WidgetNotFoundException("The widget was disposed." + SWTUtils.toString(w));
    finder = new Finder(new ControlFinder(), new MenuFinder());
    widget = w;
    display = w.getDisplay();
    log = Logger.getLogger(getClass());
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found.
   */
  public SWTBotMenu contextMenu(String text) throws WidgetNotFoundException {
    if (widget instanceof Control) {
      Control control = (Control) widget;
      return new SWTBotMenu(new Finder(finder, new ContextMenuFinder(control)), text);
    }
    throw new WidgetNotFoundException("Could not find menu: " + text);
  }
View Full Code Here

   *
   * @param controlFinder the {@link ControlFinder} used to identify and find controls.
   * @param menuFinder the {@link MenuFinder} used to find menu items.
   */
  public SWTBot(ControlFinder controlFinder, MenuFinder menuFinder) {
    this(new Finder(controlFinder, menuFinder));
  }
View Full Code Here

  /**
   * @see net.sf.swtbot.eclipse.finder.widgets.SWTBotView#findWidget(int)
   */
  protected Widget findWidget(int index) throws WidgetNotFoundException {
    Widget findWidget = findWidget(view, new Finder(new ChildrenControlFinder(super.findWidget(index)), new MenuFinder()));
    return getEditor((Composite) findWidget);
  }
View Full Code Here

TOP

Related Classes of net.sf.swtbot.finder.Finder

Copyright © 2018 www.massapicom. 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.