You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reported by tudor@tudorgirba.com on 2013-11-15 05:24:32
The text was updated successfully, but these errors were encountered:
Originally reported on Google Code with ID 1002
Reported by
tudor@tudorgirba.com
on 2013-11-15 05:24:32The text was updated successfully, but these errors were encountered: