public GroovyRootDocBuilder(GroovyDocTool tool, String[] sourcepaths, List<LinkArgument> links, Properties properties) { this.tool = tool; this.sourcepaths = sourcepaths; this.links = links; this.rootDoc = new SimpleGroovyRootDoc("root"); this.properties = properties; }
SimpleGroovyPackageDoc packageDoc = null; if (!isAbsolute) { packageDoc = (SimpleGroovyPackageDoc) rootDoc.packageNamed(packagePath); rootDoc.put(packagePath, packageDoc); return; rootDoc.putAllClasses(classDocs); if (isAbsolute) { Iterator<Map.Entry<String, GroovyClassDoc>> iterator = classDocs.entrySet().iterator(); int slash = fullPath.lastIndexOf(FS); if (slash > 0) packagePath = fullPath.substring(0, slash); packageDoc = (SimpleGroovyPackageDoc) rootDoc.packageNamed(packagePath); rootDoc.put(packagePath, packageDoc); } catch (RecognitionException e) { log.error("ignored due to RecognitionException: " + filename + " [" + e.getMessage() + "]");
public GroovyRootDoc getRootDoc() { rootDoc.resolve(); return rootDoc; } }
private GroovyClassDoc resolveInternalClassDocFromImport(GroovyRootDoc rootDoc, String baseName) { if (isPrimitiveType(baseName)) return null; for (String importName : importedClassesAndPackages) { if (importName.endsWith("/" + baseName)) { GroovyClassDoc doc = ((SimpleGroovyRootDoc)rootDoc).classNamedExact(importName); if (doc != null) return doc; } else if (importName.endsWith("/*")) { GroovyClassDoc doc = ((SimpleGroovyRootDoc)rootDoc).classNamedExact(importName.substring(0, importName.length() - 2) + baseName); if (doc != null) return doc; } } return null; }
private void calcThenSetOverviewDescription(String src) { String description = scrubOffExcessiveTags(src); rootDoc.setDescription(description); }
GroovyClassDoc doc = ((SimpleGroovyRootDoc)rootDoc).classNamedExact(name); if (doc != null) return doc; int slashIndex = name.lastIndexOf("/");
private void calcThenSetOverviewDescription(String src) { String description = scrubOffExcessiveTags(src); rootDoc.setDescription(description); }
private void processFile(String filename, File srcFile) throws IOException { String src = DefaultGroovyMethods.getText(srcFile); String packagePath = tool.getPath(filename).replace('\\', FS); String file = tool.getFile(filename); SimpleGroovyPackageDoc packageDoc = (SimpleGroovyPackageDoc) rootDoc.packageNamed(packagePath); if (packageDoc == null) { packageDoc = new SimpleGroovyPackageDoc(packagePath); } if (filename.endsWith("package.html") || filename.endsWith("package-info.java") || filename.endsWith("package-info.groovy")) { processPackageInfo(src, filename, packageDoc); rootDoc.put(packagePath, packageDoc); return; } try { Map<String, GroovyClassDoc> classDocs = getClassDocsFromSingleSource(packagePath, file, src); rootDoc.putAllClasses(classDocs); packageDoc.putAll(classDocs); rootDoc.put(packagePath, packageDoc); } catch (RecognitionException e) { System.err.println("ignored due to RecognitionException: " + filename + " [" + e.getMessage() + "]"); } catch (TokenStreamException e) { System.err.println("ignored due to TokenStreamException: " + filename + " [" + e.getMessage() + "]"); } }
public GroovyRootDocBuilder(GroovyDocTool tool, String[] sourcepaths, List<LinkArgument> links, Properties properties) { this.tool = tool; this.sourcepaths = sourcepaths; this.links = links; this.rootDoc = new SimpleGroovyRootDoc("root"); this.properties = properties; }
public GroovyRootDoc getRootDoc() { rootDoc.resolve(); return rootDoc; } }
private GroovyClassDoc resolveInternalClassDocFromImport(GroovyRootDoc rootDoc, String baseName) { if (isPrimitiveType(baseName)) return null; for (String importName : importedClassesAndPackages) { if (importName.endsWith("/" + baseName)) { GroovyClassDoc doc = ((SimpleGroovyRootDoc)rootDoc).classNamedExact(importName); if (doc != null) return doc; } else if (importName.endsWith("/*")) { GroovyClassDoc doc = ((SimpleGroovyRootDoc)rootDoc).classNamedExact(importName.substring(0, importName.length() - 2) + baseName); if (doc != null) return doc; } } return null; }
private void calcThenSetOverviewDescription(String src) { String description = scrubOffExcessiveTags(src); rootDoc.setDescription(description); }
Map classDocs = getClassDocsFromSingleSource(packagePath, file, src); rootDoc.putAllClasses(classDocs); SimpleGroovyPackageDoc packageDoc = (SimpleGroovyPackageDoc) rootDoc.packageNamed(packagePath); if (packageDoc == null) { packageDoc = new SimpleGroovyPackageDoc(packagePath); rootDoc.put(packagePath, packageDoc); } catch (RecognitionException e) { System.out.println("ignored due to RecognitionException: " + filename);
public GroovyRootDocBuilder(GroovyDocTool tool, String[] sourcepaths, List<LinkArgument> links, Properties properties) { this.tool = tool; this.sourcepaths = sourcepaths; this.links = links; this.rootDoc = new SimpleGroovyRootDoc("root"); this.properties = properties; }
public GroovyRootDoc getRootDoc() { rootDoc.resolve(); return rootDoc; } }
private GroovyClassDoc resolveInternalClassDocFromImport(GroovyRootDoc rootDoc, String baseName) { if (isPrimitiveType(baseName)) return null; for (String importName : importedClassesAndPackages) { if (importName.endsWith("/" + baseName)) { GroovyClassDoc doc = ((SimpleGroovyRootDoc)rootDoc).classNamedExact(importName); if (doc != null) return doc; } else if (importName.endsWith("/*")) { GroovyClassDoc doc = ((SimpleGroovyRootDoc)rootDoc).classNamedExact(importName.substring(0, importName.length() - 2) + baseName); if (doc != null) return doc; } } return null; }
private void calcThenSetOverviewDescription(String src) { String description = scrubOffExcessiveTags(src); rootDoc.setDescription(description); }
private void processFile(String filename, File srcFile) throws IOException { String src = DefaultGroovyMethods.getText(srcFile); String packagePath = tool.getPath(filename).replace('\\', FS); String file = tool.getFile(filename); SimpleGroovyPackageDoc packageDoc = (SimpleGroovyPackageDoc) rootDoc.packageNamed(packagePath); if (packageDoc == null) { packageDoc = new SimpleGroovyPackageDoc(packagePath); } if (filename.endsWith("package.html")) { processHtmlPackage(src, packageDoc); return; } try { Map<String, GroovyClassDoc> classDocs = getClassDocsFromSingleSource(packagePath, file, src); rootDoc.putAllClasses(classDocs); packageDoc.putAll(classDocs); rootDoc.put(packagePath, packageDoc); } catch (RecognitionException e) { System.err.println("ignored due to RecognitionException: " + filename + " [" + e.getMessage() + "]"); } catch (TokenStreamException e) { System.err.println("ignored due to TokenStreamException: " + filename + " [" + e.getMessage() + "]"); } }
public GroovyRootDocBuilder(GroovyDocTool tool, String[] sourcepaths, List<LinkArgument> links, Properties properties) { this.tool = tool; this.sourcepaths = sourcepaths; this.links = links; this.rootDoc = new SimpleGroovyRootDoc("root"); this.properties = properties; }
public GroovyRootDoc getRootDoc() { rootDoc.resolve(); return rootDoc; } }