@Test public void testAnalyze() throws IOException { Document doc = new Document(); StringWriter xrefOut = new StringWriter(); analyzer.analyze(doc, new StreamSource() { @Override public InputStream getStream() throws IOException { return new ByteArrayInputStream(content.getBytes()); } }, xrefOut); }
@Override public void analyze(Document doc, StreamSource src, Writer xrefOut) throws IOException { JFlexTokenizer symbolTokenizer = symbolTokenizerFactory.get(); symbolTokenizer.setReader(getReader(src.getStream())); OGKTextField full = new OGKTextField(QueryBuilder.FULL, symbolTokenizer); doc.add(full); if (xrefOut != null) { try (Reader in = getReader(src.getStream())) { WriteXrefArgs args = new WriteXrefArgs(in, xrefOut); args.setProject(project); Xrefer xref = writeXref(args); addNumLines(doc, xref.getLineNumber()); addLOC(doc, xref.getLOC()); } } }
TroffAnalyzer extends TextAnalyzer { @Override public void analyze(Document doc, StreamSource src, Writer xrefOut) throws IOException { JFlexTokenizer symbolTokenizer = symbolTokenizerFactory.get(); symbolTokenizer.setReader(getReader(src.getStream())); OGKTextField full = new OGKTextField(QueryBuilder.FULL, symbolTokenizer); doc.add(full); if (xrefOut != null) { try (Reader in = getReader(src.getStream())) { WriteXrefArgs args = new WriteXrefArgs(in, xrefOut); args.setProject(project); Xrefer xref = writeXref(args); addNumLines(doc, xref.getLineNumber()); addLOC(doc, xref.getLOC()); } } } }
TroffAnalyzer extends TextAnalyzer { @Override public void analyze(Document doc, StreamSource src, Writer xrefOut) throws IOException { JFlexTokenizer symbolTokenizer = symbolTokenizerFactory.get(); symbolTokenizer.setReader(getReader(src.getStream())); OGKTextField full = new OGKTextField(QueryBuilder.FULL, symbolTokenizer); doc.add(full); if (xrefOut != null) { try (Reader in = getReader(src.getStream())) { WriteXrefArgs args = new WriteXrefArgs(in, xrefOut); args.setProject(project); Xrefer xref = writeXref(args); addNumLines(doc, xref.getLineNumber()); addLOC(doc, xref.getLOC()); } } } protected  TroffAnalyzer(AnalyzerFactory factory); }
TroffAnalyzer extends TextAnalyzer { @Override public void analyze(Document doc, StreamSource src, Writer xrefOut) throws IOException { JFlexTokenizer symbolTokenizer = symbolTokenizerFactory.get(); symbolTokenizer.setReader(getReader(src.getStream())); OGKTextField full = new OGKTextField(QueryBuilder.FULL, symbolTokenizer); doc.add(full); if (xrefOut != null) { try (Reader in = getReader(src.getStream())) { WriteXrefArgs args = new WriteXrefArgs(in, xrefOut); args.setProject(project); Xrefer xref = writeXref(args); addNumLines(doc, xref.getLineNumber()); addLOC(doc, xref.getLOC()); } } } protected  TroffAnalyzer(AnalyzerFactory factory); @Override String getCtagsLang(); @Override void analyze(Document doc, StreamSource src, Writer xrefOut); }
TroffAnalyzer extends TextAnalyzer { @Override public void analyze(Document doc, StreamSource src, Writer xrefOut) throws IOException { JFlexTokenizer symbolTokenizer = symbolTokenizerFactory.get(); symbolTokenizer.setReader(getReader(src.getStream())); OGKTextField full = new OGKTextField(QueryBuilder.FULL, symbolTokenizer); doc.add(full); if (xrefOut != null) { try (Reader in = getReader(src.getStream())) { WriteXrefArgs args = new WriteXrefArgs(in, xrefOut); args.setProject(project); Xrefer xref = writeXref(args); addNumLines(doc, xref.getLineNumber()); addLOC(doc, xref.getLOC()); } } } protected  TroffAnalyzer(AnalyzerFactory factory); @Override String getCtagsLang(); @Override void analyze(Document doc, StreamSource src, Writer xrefOut);  }