Package org.eclipse.swtbot.swt.finder.finders

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


   * @param matcher a matcher.
   * @return a widget within the parent widget that matches the specified matcher.
   * @throws WorkbenchPartNotActiveException if the part is not the active part.
   */
  protected Widget findWidget(Matcher<?> matcher) {
    Finder finder = bot.getFinder();
    Control control = ((WorkbenchPartReference) partReference).getPane().getControl();
    boolean shouldFindInvisibleControls = finder.shouldFindInvisibleControls();
    finder.setShouldFindInvisibleControls(true);
    try {
      return bot.widget(matcher, control);
    } catch (Exception e) {
      throw new WidgetNotFoundException("Could not find any control inside the view " + partReference.getPartName(), e); //$NON-NLS-1$
    } finally {
      finder.setShouldFindInvisibleControls(shouldFindInvisibleControls);
    }
  }
View Full Code Here


   * @param matcher a matcher.
   * @return a widget within the parent widget that matches the specified matcher.
   * @throws WorkbenchPartNotActiveException if the part is not the active part.
   */
  protected Widget findWidget(Matcher<?> matcher) {
    Finder finder = bot.getFinder();
    Control control = getControl();
    boolean shouldFindInvisibleControls = finder.shouldFindInvisibleControls();
    finder.setShouldFindInvisibleControls(true);
    try {
      return bot.widget(matcher, control);
    } catch (Exception e) {
      throw new WidgetNotFoundException("Could not find any control inside the view " + partReference.getPartName(), e); //$NON-NLS-1$
    } finally {
      finder.setShouldFindInvisibleControls(shouldFindInvisibleControls);
    }
  }
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

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

  /**
   * @param matcher a matcher.
   * @return a widget within the parent widget that matches the specified matcher.
   */
  protected <S extends Widget> List<? extends S> findWidgets(Matcher<S> matcher) {
    Finder finder = bot.getFinder();
    Control control = getControl();
    boolean shouldFindInvisibleControls = finder.shouldFindInvisibleControls();
    finder.setShouldFindInvisibleControls(true);
    try {
      return bot.widgets(matcher, control);
    } catch (Exception e) {
      throw new WidgetNotFoundException("Could not find any control inside the view " + partReference.getPartName(), e); //$NON-NLS-1$
    } finally {
      finder.setShouldFindInvisibleControls(shouldFindInvisibleControls);
    }
  }
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

   *
   * @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

   *
   * @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

  @Before
  public final void setupSWTBot() {
    bot = new SWTBot();
    controlFinder = new ControlFinder();
    menuFinder = new MenuFinder();
    finder = new Finder(controlFinder, menuFinder);
  }
View Full Code Here

   * @return a matcher.
   * @since 2.0
   */
  @Factory
  public static <T extends Widget> Matcher<T> withLabel(String labelText) {
    return new WithLabel<T>(labelText, new Finder(new ControlFinder(), new MenuFinder()));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.finders.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.