Package org.eclipse.swtbot.swt.finder.utils

Examples of org.eclipse.swtbot.swt.finder.utils.Position


        widget.setFocus();
        int offset = widget.getSelectionRange().x;
        int line = widget.getContent().getLineAtOffset(offset);
        int offsetAtLine = widget.getContent().getOffsetAtLine(line);
        int column = offset - offsetAtLine;
        return new Position(line, column);
      }
    });
  }
View Full Code Here


   *
   * @return the text on the current line, without the line delimiters.
   * @see SWTBotStyledText#getTextOnLine(int)
   */
  public String getTextOnCurrentLine() {
    final Position currentPosition = cursorPosition();
    final int line = currentPosition.line;
    return getTextOnLine(line);
  }
View Full Code Here

        widget.setFocus();
        int offset = widget.getSelectionRange().x;
        int line = widget.getContent().getLineAtOffset(offset);
        int offsetAtLine = widget.getContent().getOffsetAtLine(line);
        int column = offset - offsetAtLine;
        return new Position(line, column);
      }
    });
  }
View Full Code Here

   *
   * @return the text on the current line, without the line delimiters.
   * @see SWTBotStyledText#getTextOnLine(int)
   */
  public String getTextOnCurrentLine() {
    final Position currentPosition = cursorPosition();
    final int line = currentPosition.line;
    return getTextOnLine(line);
  }
View Full Code Here

        widget.setFocus();
        int offset = widget.getSelectionRange().x;
        int lineNumber = widget.getContent().getLineAtOffset(offset);
        int offsetAtLine = widget.getContent().getOffsetAtLine(lineNumber);
        int columnNumber = offset - offsetAtLine;
        return new Position(lineNumber, columnNumber);
      }
    });
  }
View Full Code Here

   *
   * @return the text on the current line, without the line delimiters.
   * @see SWTBotStyledText#getTextOnLine(int)
   */
  public String getTextOnCurrentLine() {
    final Position currentPosition = cursorPosition();
    final int line = currentPosition.line;
    return getTextOnLine(line);
  }
View Full Code Here

  @Test
  public void navigatesToAParticularLocation() throws Exception {
    styledText.setText("hello world\n" + "it is a very good day today\n" + "good bye world\n" + "it was nice to meet you");
    styledText.navigateTo(1, 17);
    assertEquals(new Position(1, 17), styledText.cursorPosition());
  }
View Full Code Here

        widget.setFocus();
        int offset = widget.getSelectionRange().x;
        int line = widget.getContent().getLineAtOffset(offset);
        int offsetAtLine = widget.getContent().getOffsetAtLine(line);
        int column = offset - offsetAtLine;
        return new Position(line, column);
      }
    });
  }
View Full Code Here

   *
   * @return the text on the current line, without the line delimiters.
   * @see SWTBotStyledText#getTextOnLine(int)
   */
  public String getTextOnCurrentLine() {
    final Position currentPosition = cursorPosition();
    final int line = currentPosition.line;
    return getTextOnLine(line);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.utils.Position

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.