Package net.sf.swtbot.finder.UIThreadRunnable

Examples of net.sf.swtbot.finder.UIThreadRunnable.ListResult


   * @param matcher the matcher that can match menus and menu items.
   * @param recursive if set to true, will find sub-menus as well.
   * @return all menus in the specified menubar that match the matcher.
   */
  public List findMenus(final Menu bar, final IMatcher matcher, final boolean recursive) {
    return UIThreadRunnable.syncExec(display, new ListResult() {
      public List run() {
        return findMenusInternal(bar, matcher, recursive);
      }
    });
  }
View Full Code Here


   *
   * @return the list of columns in the table.
   */
  public List columns() {
    final int columnCount = columnCount();
    return syncExec(new ListResult() {
      public List run() {
        final String columns[] = new String[columnCount];
        for (int i = 0; i < columnCount; i++)
          columns[i] = getControl().getColumn(i).getText();
        return new ArrayList(Arrays.asList(columns));
View Full Code Here

   * @param recursive if the match should be recursive.
   * @return all visible widgets in the parentWidget that the matcher matches. If recursive is <code>true</code> then
   *         find the widget within each of the parentWidget.
   */
  public List findControls(final Widget parentWidget, final IMatcher matcher, final boolean recursive) {
    return UIThreadRunnable.syncExec(display, new ListResult() {
      public List run() {
        return findControlsInternal(parentWidget, matcher, recursive);
      }
    });
  }
View Full Code Here

      }
    });
  }

  private List getParents(final Widget w) {
    return UIThreadRunnable.syncExec(display, new ListResult() {
      public List run() {
        Widget parent = w;
        List parents = new LinkedList();
        while (parent != null) {
          parents.add(parent);
View Full Code Here

   * Finds the editors.
   *
   * @return all the editors in the workbench.
   */
  public static List findEditors() {
    return UIThreadRunnable.syncExec(SWTUtils.display(), new ListResult() {
      public List run() {
        ArrayList result = new ArrayList();
        IWorkbenchPage[] pages = getWorkbenchPages();
        for (int i = 0; i < pages.length; i++) {
          IWorkbenchPage page = pages[i];
View Full Code Here

  public List getAutoCompleteProposals(String insertText) throws QuickFixNotFoundException, TimeoutException {
    styledText.typeText(insertText);
    bot.sleep(1000);
    SWTBotShell autoCompleteShell = activateAutoCompleteShell();
    final SWTBotTable autoCompleteTable = getQuickFixTable(autoCompleteShell);
    List result = syncExec(new ListResult() {
      public List run() {
        TableItem[] items = ((Table) autoCompleteTable.widget).getItems();
        ArrayList result = new ArrayList();
        for (int i = 0; i < items.length; i++) {
          TableItem tableItem = items[i];
View Full Code Here

   * @param service the {@link ICommandService} instance to use.
   * @param matcher the matcher that can match the command item.
   * @return The list of {@link Command}s that match the matcher.
   */
  public List findCommand(final ICommandService service, final IMatcher matcher) {
    return UIThreadRunnable.syncExec(new ListResult() {

      public List run() {
        List l = new ArrayList();
        Command[] commands = service.getDefinedCommands();

View Full Code Here

   * @param matcher the matcher that can match menus and menu items.
   * @param recursive if set to <code>true</code>, will find sub-menus as well.
   * @return The list of menus (IContributionItems) that match the matcher.
   */
  public List findMenus(final IViewReference view, final IMatcher matcher, final boolean recursive) {
    return UIThreadRunnable.syncExec(new ListResult() {

      public List run() {
        ViewPane viewPane = (ViewPane) ((WorkbenchPartReference) view).getPane();
        MenuManager mgr = viewPane.getMenuManager();
        List l = new ArrayList();
View Full Code Here

   * Finds all the views.
   *
   * @return all the views in the workbench.
   */
  public static List findViews() {
    return UIThreadRunnable.syncExec(SWTUtils.display(), new ListResult() {
      public List run() {
        ArrayList result = new ArrayList();
        IWorkbenchPage[] pages = getWorkbenchPages();
        for (int i = 0; i < pages.length; i++) {
          IWorkbenchPage page = pages[i];
View Full Code Here

   *
   * @return The set of toolbar buttons.
   * @since 1.2
   */
  public List getToolbarButtons() {
    return UIThreadRunnable.syncExec(new ListResult() {

      public List run() {
        ViewPane obj = (ViewPane) ((WorkbenchPartReference) view).getPane();
        ToolBar toolbar = (ToolBar) obj.getToolBar();

View Full Code Here

TOP

Related Classes of net.sf.swtbot.finder.UIThreadRunnable.ListResult

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.