Esempio n. 1
0
    def makeNode(tree, sg, node):
        if node is not None:
            code = node

            if not code.isStandardCode():
                nodecolor = "#4444FF"
            elif code.annotation.descriptive:
                nodecolor = "#FF3333"
            elif code.codeparameters.selfparam is None:
                nodecolor = '#BBBBBB'
            else:
                nodecolor = '#33FF33'
            sg.add_node(
                pydot.Node(str(id(node)),
                           label=dumputil.codeShortName(code),
                           shape='box',
                           style="filled",
                           fontsize=8,
                           fillcolor=nodecolor,
                           URL=links.codeRef(node, None)))
        else:
            sg.add_node(
                pydot.Node(str(id(node)),
                           label="entry",
                           shape='point',
                           style="filled",
                           fontsize=8))

        children = tree.get(node)
        if children:
            csg = pydot.Cluster(str(id(node)))
            sg.add_subgraph(csg)
            for child in children:
                makeNode(tree, csg, child)
Esempio n. 2
0
	def makeNode(tree, sg, node):
		if node is not None:
			code = node

			if not code.isStandardCode():
				nodecolor = "#4444FF"
			elif code.annotation.descriptive:
				nodecolor = "#FF3333"
			elif code.codeparameters.selfparam is None:
				nodecolor = '#BBBBBB'
			else:
				nodecolor = '#33FF33'
			sg.add_node(pydot.Node(str(id(node)), label=dumputil.codeShortName(code),
				shape='box', style="filled", fontsize=8,
				fillcolor=nodecolor, URL=links.codeRef(node, None)))
		else:
			sg.add_node(pydot.Node(str(id(node)), label="entry",
				shape='point', style="filled", fontsize=8))

		children = tree.get(node)
		if children:
			csg = pydot.Cluster(str(id(node)))
			sg.add_subgraph(csg)
			for child in children:
				makeNode(tree, csg, child)
Esempio n. 3
0
def outputCodeShortName(out, code, links=None, context=None):
	link = links.codeRef(code, context) if links is not None else None

	if link: out.begin('a', href=link)
	out << dumputil.codeShortName(code)
	if link: out.end('a')
Esempio n. 4
0
def outputCodeShortName(out, code, links=None, context=None):
    link = links.codeRef(code, context) if links is not None else None

    if link: out.begin('a', href=link)
    out << dumputil.codeShortName(code)
    if link: out.end('a')