Package com.intellij.util.text

Examples of com.intellij.util.text.CharSequenceReader


  }

  @NotNull
  public static Document loadDocument(CharSequence seq) throws IOException, JDOMException {
    SAXBuilder builder = ourSaxBuilder.get();
    return builder.build(new CharSequenceReader(seq));
  }
View Full Code Here


    return builder.build(new CharArrayReader(chars, 0, length));
  }

  public static Document loadDocument(CharSequence seq) throws IOException, JDOMException {
    SAXBuilder builder = ourSaxBuilder.get();
    return builder.build(new CharSequenceReader(seq));
  }
View Full Code Here

        int startLine = 1;
        int startOffset = -1;
        int endLine = 1;
        int endOffset = -1;
        try {
            BufferedReader reader = new BufferedReader(new CharSequenceReader(charsSequence));
            String lineString;
            int currentCharCount = 0;
            while ((lineString = reader.readLine()) != null) {
                currentCharCount += lineString.length();
                currentCharCount++; // line break
View Full Code Here

    public static Offset rangeToTextOffset(CharSequence charsSequence, Comment.Range range) {
        int startOffset = 0;
        int endOffset = 0;
        try {
            BufferedReader reader = new BufferedReader(new CharSequenceReader(charsSequence));
            String line;
            int textLineCount = 1;
            while ((line = reader.readLine()) != null) {
                if (textLineCount < range.startLine) {
                    startOffset += line.length();
View Full Code Here

      }

      final Document document = FileDocumentManager.getInstance().getCachedDocument(virtualFile);

      if (document != null) {
        parse(new CharSequenceReader(document.getCharsSequence()), builder);
      }
      else {
        final InputStream inputStream;
        try {
          inputStream = virtualFile.getInputStream();
View Full Code Here

TOP

Related Classes of com.intellij.util.text.CharSequenceReader

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.