Package org.eclipse.swtbot.swt.finder.widgets

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


   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotStyledText styledText(String text, int index) {
    Matcher matcher = allOf(widgetOfType(StyledText.class), withText(text));
    return new SWTBotStyledText((StyledText) widget(matcher, index), matcher);
  }
View Full Code Here


   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotStyledText styledTextWithId(String key, String value, int index) {
    Matcher matcher = allOf(widgetOfType(StyledText.class), withId(key, value));
    return new SWTBotStyledText((StyledText) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotStyledText styledTextWithId(String value, int index) {
    Matcher matcher = allOf(widgetOfType(StyledText.class), withId(value));
    return new SWTBotStyledText((StyledText) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotStyledText styledTextInGroup(String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(StyledText.class), inGroup(inGroup));
    return new SWTBotStyledText((StyledText) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotStyledText styledText(int index) {
    Matcher matcher = allOf(widgetOfType(StyledText.class));
    return new SWTBotStyledText((StyledText) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotStyledText styledTextWithLabelInGroup(String label, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(StyledText.class), withLabel(label), inGroup(inGroup));
    return new SWTBotStyledText((StyledText) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotStyledText styledTextInGroup(String text, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(StyledText.class), withText(text), inGroup(inGroup));
    return new SWTBotStyledText((StyledText) widget(matcher, index), matcher);
  }
View Full Code Here

  public static CompareEditorTester forTitleContaining(String title) {
    SWTWorkbenchBot bot = new SWTWorkbenchBot();
    SWTBotEditor editor = bot.editor(new CompareEditorTitleMatcher(title));
    // Ensure that both StyledText widgets are enabled
    SWTBotStyledText styledText = editor.toTextEditor().getStyledText();
    bot.waitUntil(Conditions.widgetIsEnabled(styledText));
    return new CompareEditorTester(editor);
  }
View Full Code Here

  // is slower because it waits if the toggle is named "Show Ancestor Pane".
  private SWTBotStyledText getNonAncestorEditor(int index) {
    List<StyledText> texts = editor.bot().getFinder()
        .findControls(widgetOfType(StyledText.class));
    if (texts.size() == 2)
      return new SWTBotStyledText(texts.get(index));
    else if (texts.size() == 3)
      return new SWTBotStyledText(texts.get(index + 1));
    else
      throw new IllegalStateException(
          "Expected compare editor to contain 2 or 3 styled text widgets, but was "
              + texts.size());
  }
View Full Code Here

    SWTBotEditor editor = bot.editorByTitle(name);
    editor.setFocus();

    // the WidgetNotFoundException will be thrown when widget with given content cannot be not found
    SWTBotStyledText left = editor.bot().styledText(content);
    SWTBotStyledText right = editor.bot().styledText("");
    // to be complete sure assert that both sides are not the same
    assertNotSame(left, right);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText

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.