0N/A * The contents of this file are subject to the terms of the 0N/A * Common Development and Distribution License (the "License"). 0N/A * You may not use this file except in compliance with the License. 0N/A * language governing permissions and limitations under the License. 0N/A * When distributing Covered Code, include this CDDL HEADER in each 0N/A * If applicable, add the following below this CDDL HEADER, with the 0N/A * fields enclosed by brackets "[]" replaced with your own identifying 0N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1253N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * for plain text tokenizers 1470N/A * Buffer that holds all the text from the start of the current line, or, in 1470N/A * the case of a match that spans multiple lines, from the start of the 1470N/A * first line part of the matching region. 1470N/A * Set the writer that should receive all output 1470N/A * @param out The new writer to write to 1470N/A * Set the name of the file we are working on (needed if we would like to 1470N/A * generate a list of hits instead of generating html) 1470N/A * @param filename the name of the file 1470N/A * Set the list we should create Hit objects for 1470N/A * @param hits the hits we should add Hit objects 1470N/A * Reinitialize the tokenizer with new contents. 1470N/A * @param buf a char buffer with text to tokenize 1470N/A * @param len the number of characters to use from the char buffer 1470N/A * @param out where to write htmlized results 1470N/A * @param url URI encoded URL prefix to use when generating links 1470N/A * @param tags tag map to use. If {@code null} a new one gets created. 1470N/A * Reinitialize the tokenizer with new contents. 1470N/A * @param in source of the text to tokenize 1470N/A * @param out where to write htmlized results 1470N/A * @param url URI encoded URL prefix to use when generating links 1470N/A * @param tags tag map to use. If {@code null} a new one gets created. 1470N/A /** Current token could be part of a match. Hold on... */ 1470N/A /** Not a match after all. */ 1390N/A // should be similar to Context::getContext() 1470N/A // TODO: closing tag - where? 1470N/A // print first part of line without normal font 1470N/A // use bold font for the match 1080N/A // Remove everything up to the start of the current line in the 1470N/A // Assume that this line has been truncated if we don't 1470N/A // find a newline after looking at maxLooks characters, 1470N/A // or if we reach the end of the buffer and the size of 1470N/A // the buffer is Context.MAXFILEREAD (which means that 1470N/A // the file has probably been truncated). 0N/A//WhiteSpace = [ \t\f\r]+|\n 1470N/A // We have dumped the rest of the line, begun a new 1470N/A // line, and we're not inside a possible match, so it's 1470N/A // safe to forget the buffered contents.