Package org.eclipse.swtbot.swt.finder.results

Examples of org.eclipse.swtbot.swt.finder.results.VoidResult


  /**
   * Toggle the selection of the checkbox if applicable.
   */
  private void toggleSelection() {
    syncExec(new VoidResult() {
      public void run() {
        if (hasStyle(widget, SWT.CHECK) | hasStyle(widget, SWT.RADIO))
          widget.setSelection(!widget.getSelection());
      }
    });
View Full Code Here


   * @return the tree item, after expanding it.
   */
  public SWTBotTreeItem expand() {
    assertEnabled();
    preExpandNotify();
    asyncExec(new VoidResult() {
      public void run() {
        widget.setExpanded(true);
      }
    });
    postExpandNotify();
View Full Code Here

   * @return the current node.
   * @since 1.0
   */
  public SWTBotTreeItem select() {
    assertEnabled();
    syncExec(new VoidResult() {
      public void run() {
        tree.setFocus();
        tree.setSelection(widget);
      }
    });
View Full Code Here

   * @return the current node.
   * @since 1.2
   */
  public SWTBotTreeItem doubleClick() {
    assertEnabled();
    asyncExec(new VoidResult() {
      public void run() {
        tree.setSelection(widget);
      }
    });
    notifyTree(SWT.Selection);
View Full Code Here

  public SWTBotTreeItem select(final String... items) {
    assertEnabled();
    final List<String> nodes = Arrays.asList(items);
    Assert.isTrue(getNodes().containsAll(nodes));

    syncExec(new VoidResult() {
      public void run() {
        TreeItem[] treeItems = widget.getItems();
        ArrayList<TreeItem> selection = new ArrayList<TreeItem>();

        for (TreeItem treeItem : treeItems) {
View Full Code Here

  }

  private void setChecked(final boolean checked) {
    assertEnabled();
    assertIsCheck();
    syncExec(new VoidResult() {
      public void run() {
        log.debug(MessageFormat.format("Setting state to {0} on: {1}", (checked ? "checked" : "unchecked"), widget.getText())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        widget.setChecked(checked);
      }
    });
View Full Code Here

   * notify listeners about checkbox state change.
   *
   * @since 1.3
   */
  private void notifyCheck() {
    syncExec(new VoidResult() {
      public void run() {
        tree.notifyListeners(SWT.Selection, createCheckEvent());
      }
    });
  }
View Full Code Here

  /**
   * Close the partReference.
   */
  public void close() {
    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        IViewReference viewReference = (IViewReference) partReference;
        viewReference.getPage().hideView(viewReference);
      }
    });
View Full Code Here

  /**
   * Shows the part if it is visible.
   */
  public void show() {
    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        try {
          partReference.getPage().activate(partReference.getPart(true));
          partReference.getPage().showView(partReference.getId());
        } catch (PartInitException e) {
View Full Code Here

  public SWTBotView(IViewReference partReference, SWTWorkbenchBot bot, SelfDescribing description) {
    super(partReference, bot, description);
  }

  public void setFocus() {
    syncExec(new VoidResult() {
      public void run() {
        ((Control) getWidget()).setFocus();
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.results.VoidResult

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.