Open jecisc opened 4 years ago
In fact it is not the configurations that it does not manage. It's the dependencies not loaded in the image.
Here is a much better version:
| project |
project := BaselineOfMoose.
substringsOfProjectsToHighlight := #(#Famix #Fame #Moose #TestResource).
visu := TLVisualization new.
visu addNodesFromEntities: ((BaselineOfMoose project version withDeepCollect: [ :each | each projects collect: #version ])
inject: OrderedCollection new
into: [ :coll :vers |
coll detect: [ :each | each versionNumber = vers versionNumber and: [ each projectLabel = vers projectLabel ] ] ifNone: [ coll add: vers ].
coll ]).
visu nodes
do: [ :each |
(each entity projects collect: [ :e | visu nodes detect: [ :n | n entity = e version and: [ n entity projectLabel = e version projectLabel ] ] ifNone: [ nil ] ])
asSet do: [ :n | n ifNotNil: [ each connectToNode: n ] ] ].
visu styleSheet
nodeLabel: [ :each | each projectLabel withoutPrefix: #BaselineOf ];
nodeLabelPosition: #bottom;
backgroundColor: [ :each | (substringsOfProjectsToHighlight anySatisfy: [ :e | each projectLabel includesSubstring: e ]) ifTrue: [ MDLColor green ] ifFalse: [ MDLColor orange ] ];
labelSize: 11.
visu layout: (TLTreeLayout rightToLeft
leavesGap: 70;
levelGap: 100;
yourself).
visu addInteractions:
{(TLStyleCustomizationAction
custom: [ :style :drawable |
drawable isConnection
ifTrue: [ style
color: MDLColor blue;
width: 3 ]
ifFalse: [ style
labelSize: 20;
textColor: MDLColor blue ].
self ]
target: [ :aDrawable | aDrawable incomingConnections flatCollectAsSet: #withConnectedNodes ]) onMouseOver propagateToChildren . (TLStyleCustomizationAction
custom: [ :style :drawable |
drawable isConnection
ifTrue: [ style
color: MDLColor orange;
width: 3 ]
ifFalse: [ style
labelSize: 20;
textColor: MDLColor orange ].
self ]
target: [ :aDrawable | aDrawable outgoingConnections flatCollectAsSet: #withConnectedNodes ]) onMouseOver propagateToChildren}.
visu open
In Metacello versions do not implement the equality right. Thus we need to update the code of the visu.
I have a proto:
I little ugly but working. It does not manage well configurations, only baselines.