Status: New
Owner: ----
CC: alexandr...(a)gmail.com
Labels: Type-Enhancement Priority-Medium Component-Roassal Milestone-5.0
New issue 1002 by tu...(a)tudorgirba.com: The treemap builder should support
multiple types of nodes
http://code.google.com/p/moose-technology/issues/detail?id=1002
TreeMaps are particularly useful to show leaf nodes within a nested parent
nodes tree. For example, they can show classes within packages. They are
less useful for showing only one type of nodes, like a class hierarchy
given that the weight is only meaningful when applied to the leaf nodes.
However, right now, we can specify nodes only with one block, weight with
one block only and edges with another one block. This is less convenient.
We should extend this to allow multiple sets of nodes.
Consider this code:
packages := RPackageOrganizer default packages select: [:each | each name
beginsWith: 'AST'].
classes := packages flatCollect: [:each | each definedClasses ].
...
builder weightBlock: [ :el | el isBehavior ifTrue: [ el linesOfCode + 1]
ifFalse: [ 1 ] ].
builder nodes: (packages), (classes).
builder nestingFromAssociations: (
(builder nodes select: [ :each | each isBehavior ])
collect: [ :each |
(each) -> each package ]).
builder drawOn: rawView .
It would be better to have it like:
builder weight: [ :el | el linesOfCode + 1] ].
builder nodes: classes.
builder nodes: packages
builder nest: classes in: [ :each | each package ].
builder drawOn: rawView .
Note how nesting is defined following the same pattern as edges:from:to:,
and how the weight is only applied to the next nodes.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings