Package org.rssowl.ui.internal.util

Examples of org.rssowl.ui.internal.util.ExpandingReader


    /* TODO Experimental Highlight Support */
    List<String> wordsToHighlight = fViewer.getHighlightedWords();
    if (!wordsToHighlight.isEmpty()) {
      StringBuilder highlightedResult = new StringBuilder(result.length());
      ExpandingReader resultHighlightReader = new ExpandingReader(new StringReader(result), wordsToHighlight, PRE_HIGHLIGHT, POST_HIGHLIGHT, true);

      int len = 0;
      char[] buf = new char[1000];
      try {
        while ((len = resultHighlightReader.read(buf)) != -1)
          highlightedResult.append(buf, 0, len);

        return highlightedResult.toString();
      } catch (IOException e) {
        Activator.getDefault().logError(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.rssowl.ui.internal.util.ExpandingReader

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.