use of org.eclipse.swtbot.swt.finder.utils.Position in project translationstudio8 by heartsome.
the class XlfEditor method navigateBefore.
/**
* 将光标定位到指定字符串之前
* @param beforeText
* 指定的字符串,光标将置于其第一个字符之前
*/
public void navigateBefore(String beforeText) {
HsSWTBotStyledText styledText = getStyledText();
Position targetPos = styledText.positionOf(beforeText);
Assert.isTrue(!targetPos.equals(new Position(-1, -1)), "Text \"" + beforeText + "\" not found.");
styledText.navigateTo(targetPos);
}
Aggregations