Examples of WidgetNotFoundException


Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

   * @param description the description of the widget, this will be reported by {@link #toString()}
   * @throws WidgetNotFoundException if the widget is <code>null</code> or widget has been disposed.
   */
  public AbstractSWTBot(T w, SelfDescribing description) throws WidgetNotFoundException {
    if (w == null)
      throw new WidgetNotFoundException("The widget was null."); //$NON-NLS-1$

    this.widget = w;
    if (description == null)
      this.description = new WidgetTextDescription(w);
    else
      this.description = description;

    if (w.isDisposed())
      throw new WidgetNotFoundException("The widget {" + description + "} was disposed." + SWTUtils.toString(w)); //$NON-NLS-1$ //$NON-NLS-2$

    display = w.getDisplay();
    log = Logger.getLogger(getClass());
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

   */
  public SWTBotMenu contextMenu(final String text) throws WidgetNotFoundException {
    if (widget instanceof Control) {
      return contextMenu((Control) widget, text);
    }
    throw new WidgetNotFoundException("Could not find menu: " + text); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

        }
        return null;
      }
    });
    if (item == null)
      throw new WidgetNotFoundException("Could not find node with text: " + nodeText); //$NON-NLS-1$
    return item;
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

        try {
          IWorkbench workbench = PlatformUI.getWorkbench();
          workbench.showPerspective(perspectiveDescriptor.getId(), workbench.getActiveWorkbenchWindow());
        } catch (Exception e) {
          // TODO: what's the correct exception for such an error? Own exception class?
          throw new WidgetNotFoundException(e.getMessage(), e);
        }
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

        public void run() {
          action.run();
        }
      });
    else
      throw new WidgetNotFoundException("There is no action or contribution id to execute."); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

            throw new RuntimeException("Failed to execute the command - " + commandID, e); //$NON-NLS-1$
          }
        }
      });
    } else
      throw new WidgetNotFoundException("The command to could not be execute due to the lack of an ID."); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

   */
  public String getText() throws WidgetNotFoundException {
    try {
      return cmdItem.getName();
    } catch (NotDefinedException e) {
      throw new WidgetNotFoundException(e.getMessage());
    }
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

        List<SWTBotCommand> command = finder.findCommand(equalTo(label));
        return command.get(index);
      }
      return menuItems.get(index);
    } catch (Exception e) {
      throw new WidgetNotFoundException("Could not find view menu with label " + label + " at index " + index, e); //$NON-NLS-1$ //$NON-NLS-2$
    }
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

  public SWTBotToolbarDropDownButton toolbarDropDownButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarDropDownButton)
      return (SWTBotToolbarDropDownButton) abstractButton;

    throw new WidgetNotFoundException("Unable to find toolitem with the given tooltip '" + tooltip + "'"); //$NON-NLS-1$ //$NON-NLS-2$
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException

  public SWTBotToolbarRadioButton toolbarRadioButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarRadioButton)
      return (SWTBotToolbarRadioButton) abstractButton;

    throw new WidgetNotFoundException("Unable to find toolitem with the given tooltip '" + tooltip + "'"); //$NON-NLS-1$ //$NON-NLS-2$
  }
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.