# HG changeset patch # User Doug Simon # Date 1349342529 -7200 # Node ID 305b9166b455b885e240976b8cb90741710d1289 # Parent 1ecf984d490c5c964baa7e1b5f820fe91fa73658 added projects table to the top level javadoc page generated by the site command diff -r 1ecf984d490c -r 305b9166b455 graal/overview.html --- a/graal/overview.html Wed Oct 03 23:44:38 2012 +0200 +++ b/graal/overview.html Thu Oct 04 11:22:09 2012 +0200 @@ -30,11 +30,11 @@ - +

This document is the unified Javadoc for the Graal code base. -The module dependency graph is shown above. -Each node in the diagram is a link to the standalone Javadoc for the denoted module. +The project dependency graph is shown above. +Each node in the diagram is a link to the standalone Javadoc for the denoted project.

[go to the OpenJDK Graal project site] diff -r 1ecf984d490c -r 305b9166b455 mx/commands.py --- a/mx/commands.py Wed Oct 03 23:44:38 2012 +0200 +++ b/mx/commands.py Thu Oct 04 11:22:09 2012 +0200 @@ -1003,7 +1003,7 @@ '--jd', '@-tag', '--jd', '@vmoption:X', '--overview', join(_graal_home, 'graal', 'overview.html'), '--title', 'Graal OpenJDK Project Documentation', - '--dot-output-base', 'modules'] + args) + '--dot-output-base', 'projects'] + args) def mx_init(): _vmbuild = 'product' diff -r 1ecf984d490c -r 305b9166b455 mxtool/mx.py --- a/mxtool/mx.py Wed Oct 03 23:44:38 2012 +0200 +++ b/mxtool/mx.py Thu Oct 04 11:22:09 2012 +0200 @@ -1215,7 +1215,7 @@ parser.add_argument('remainder', nargs=REMAINDER, metavar='...') args = parser.parse_args(args) - + jdtJar = None if args.jdt is not None: if args.jdt.endswith('.jar'): @@ -2430,6 +2430,26 @@ javadoc(['--base', tmpbase] + exclude_packages_arg + projects_arg + extra_javadoc_args) # Create unified javadoc for all projects + with open(args.overview) as fp: + content = fp.read() + idx = content.rfind('') + if idx != -1: + args.overview = join(tmpbase, 'overview_with_projects.html') + with open(args.overview, 'w') as fp2: + print >> fp2, content[0:idx] + print >> fp2, """

+ + + +""" + color = 'row' + for p in projects: + print >> fp2, ''.format(p.name, color) + color = 'row' if color == 'alt' else 'alt' + + print >> fp2, '
Projects 
Project 
{0} 
' + print >> fp2, content[idx:] + title = args.title if args.title is not None else args.name javadoc(['--base', tmpbase, '--unified', @@ -2440,6 +2460,18 @@ # Generate dependency graph with Graphviz if args.dot_output_base is not None: + dotErr = None + try: + if not 'version' in subprocess.check_output(['dot', '-V'], stderr=subprocess.STDOUT): + dotErr = 'dot -V does not print a string containing "version"' + except subprocess.CalledProcessError as e: + dotErr = 'error calling "dot -V": {}'.format(e) + except OSError as e: + dotErr = 'error calling "dot -V": {}'.format(e) + + if dotErr != None: + abort('cannot generate dependency graph: ' + dotErr) + dot = join(tmpbase, 'all', str(args.dot_output_base) + '.dot') svg = join(tmpbase, 'all', str(args.dot_output_base) + '.svg') jpg = join(tmpbase, 'all', str(args.dot_output_base) + '.jpg') @@ -2461,21 +2493,21 @@ d = p.max_depth() depths.setdefault(d, list()).append(p.name) print >> fp, '}' - + run(['dot', '-Tsvg', '-o' + svg, '-Tjpg', '-o' + jpg, dot]) - # Post-process generated SVG to remove title elements which most browsers - # render as redundant (and annoying) tooltips. - with open(svg, 'r') as fp: - content = fp.read() - content = re.sub('.*', '', content) - content = re.sub('xlink:title="[^"]*"', '', content) - with open(svg, 'w') as fp: - fp.write(content) - - # Create HTML that embeds the svg file in an frame - with open(html, 'w') as fp: - print >> fp, '' + # Post-process generated SVG to remove title elements which most browsers + # render as redundant (and annoying) tooltips. + with open(svg, 'r') as fp: + content = fp.read() + content = re.sub('.*', '', content) + content = re.sub('xlink:title="[^"]*"', '', content) + with open(svg, 'w') as fp: + fp.write(content) + + # Create HTML that embeds the svg file in an frame + with open(html, 'w') as fp: + print >> fp, ''.format(args.dot_output_base) top = join(tmpbase, 'all', 'overview-summary.html') for root, _, files in os.walk(tmpbase):