Examples of SWTBotShell


Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @return the number of quickfix items in the quickfix proposals.
   * @throws QuickFixNotFoundException if the quickfix could not be found.
   * @since 1.2
   */
  public int getQuickfixListItemCount() throws QuickFixNotFoundException {
    SWTBotShell quickFixShell = activateQuickFixShell();
    SWTBotTable quickFixTable = getQuickFixTable(quickFixShell);
    return quickFixTable.rowCount();
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @return The shell.
   * @throws QuickFixNotFoundException Throw if a quick fix problem occurs.
   */
  private SWTBotShell activatePopupShell() throws QuickFixNotFoundException {
    try {
      SWTBotShell shell = bot.shell("", bot.activeShell().widget); //$NON-NLS-1$
      shell.activate();
      log.debug("Activated quickfix shell."); //$NON-NLS-1$
      return shell;
    } catch (Exception e) {
      throw new QuickFixNotFoundException("Quickfix popup not found. Giving up.", e); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @since 1.2
   */
  public List<String> getAutoCompleteProposals(String insertText) throws QuickFixNotFoundException, TimeoutException {
    styledText.typeText(insertText);
    bot.sleep(1000);
    SWTBotShell autoCompleteShell = activateAutoCompleteShell();
    final SWTBotTable autoCompleteTable = getQuickFixTable(autoCompleteShell);
    List<String> result = UIThreadRunnable.syncExec(new ListResult<String>() {
      public List<String> run() {
        TableItem[] items = autoCompleteTable.widget.getItems();
        ArrayList<String> result = new ArrayList<String>();
        for (int i = 0; i < items.length; i++) {
          TableItem tableItem = items[i];
          result.add(tableItem.getText());
        }
        return result;
      }
    });
    // makeProposalsDisappear();
    autoCompleteShell.close();
    return result;
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @param proposalText The text to propose.
   * @throws QuickFixNotFoundException Thrown if the quick fix error occurs.
   */
  private void autoComplete(String proposalText) throws QuickFixNotFoundException {
    int retries = 10;
    SWTBotShell autoCompleteShell = activateAutoCompleteShell();
    SWTBotTable autoCompleteTable = getQuickFixTable(autoCompleteShell);
    applyQuickFix(autoCompleteTable, proposalText, retries);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

    return "The shell '" + text + "' did not activate"; //$NON-NLS-1$ //$NON-NLS-2$
  }

  public boolean test() throws Exception {
    try {
      final SWTBotShell shell = bot.shell(text);
      return UIThreadRunnable.syncExec(new BoolResult() {
        public Boolean run() {
          return shell.widget.isVisible() || shell.widget.isFocusControl();
        }
      });
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @return a wrapper around a {@link Shell} with the specified index.
   * @param text the text on the shell.
   * @param index the index of the shell, in case there are multiple shells with the same text.
   */
  public SWTBotShell shell(String text, int index) {
    return new SWTBotShell(shells(text).get(index));
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @param text the text on the shell.
   * @param parent the parent under which a shell will be found.
   * @param index the index of the shell, in case there are multiple shells with the same text.
   */
  public SWTBotShell shell(String text, Shell parent, int index) {
    return new SWTBotShell(shells(text, parent).get(index));
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @since 2.0
   */
  public SWTBotShell shellWithId(String value, int index) {
    WaitForShell waitForShell = waitForShell(withId(value));
    waitUntilWidgetAppears(waitForShell);
    return new SWTBotShell(waitForShell.get(index));
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   * @return a wrapper around a @{link Shell} with the specified key/value pair for its id.
   */
  public SWTBotShell shellWithId(String key, String value, int index) {
    WaitForShell waitForShell = waitForShell(withId(key, value));
    waitUntilWidgetAppears(waitForShell);
    return new SWTBotShell(waitForShell.get(index));
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell

   */
  public SWTBotShell[] shells() {
    Shell[] shells = finder.getShells();
    ArrayList<SWTBotShell> result = new ArrayList<SWTBotShell>();
    for (Shell shell : shells) {
      result.add(new SWTBotShell(shell));
    }
    return result.toArray(new SWTBotShell[] {});
  }
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.