Java 类com.intellij.openapi.editor.impl.LineSet 实例源码

项目:intellij-ce-playground    文件:LineSetIncrementalUpdateTest.java   
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);
    }
  }
项目:intellij-ce-playground    文件:LineSetIncrementalUpdateTest.java   
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);
  }
}
项目:intellij-ce-playground    文件:EditorTextFieldCellRenderer.java   
@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);
}
项目:consulo    文件:EditorTextFieldCellRenderer.java   
@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);
}