public void testDelete() throws Exception { try { configureFromFileText("test.jsp","aaa\n<caret>bbb\n"); doInsert(); LineSet.setTestingMode(true); doDelete(); LineSet.setTestingMode(false); configureFromFileText("test.jsp","<caret>"); doInsert(); LineSet.setTestingMode(true); doDelete(); LineSet.setTestingMode(false); } finally { LineSet.setTestingMode(false); } }
public void testInsert() throws Exception { LineSet.setTestingMode(true); try { configureFromFileText("test.jsp","<caret>"); doInsert(); configureFromFileText("test.jsp","aaa\nb<caret>bb\n"); doInsert(); } finally { LineSet.setTestingMode(false); } }
@Override public void setText(@NotNull CharSequence text) { String s = StringUtil.convertLineSeparators(text.toString()); myChars = new char[s.length()]; s.getChars(0, s.length(), myChars, 0); myString = new String(myChars); myLineSet = LineSet.createLineSet(myString); }
@Override public void setText(@Nonnull CharSequence text) { String s = StringUtil.convertLineSeparators(text.toString()); myChars = new char[s.length()]; s.getChars(0, s.length(), myChars, 0); myString = new String(myChars); myLineSet = LineSet.createLineSet(myString); }