ObjectProfile / Roassal2

Agile Visualization Engine for Pharo and VisualWorks
http://AgileVisualization.com
MIT License
26 stars 20 forks source link

Script of the day #30

Closed pavel-krivanek closed 5 years ago

pavel-krivanek commented 5 years ago

Issue by bergel Tuesday Jun 13, 2017 at 17:00 GMT Originally opened as https://github.com/moosetechnology/Moose/issues/1230


Edge width indicating dependence between packages.

Here is an examples for classes:

b := RTMondrian new.
b shape circle size: 20; color: Color red trans.
b nodes: RTObject withAllSubclasses.

b shape line color: Color blue trans.
es := b edges connectToAll: #dependentClasses.
b layout force charge: -500.
b normalizer 
    edges: es;
    normalizeLineWidth: [ :from :to | 
        | outgoingRef |
        outgoingRef := (from methods flatCollect: [ :cm | cm literals select: [ :l | l class == GlobalVariable ] ]) groupedBy: #value.
        (outgoingRef keys includes: to)
            ifTrue: [ (outgoingRef at: to) size ]
            ifFalse: [ 0 ] ] min: 0.2 max: 10.
b
pavel-krivanek commented 5 years ago

Comment by jecisc Wednesday Jun 14, 2017 at 08:26 GMT


Is there an issue here?

If you wish to keep this snippet maybe a Gist or a Wiki would be better.

bergel commented 5 years ago

Much better version of the script:

b := RTMondrian new.
b shape circle size: 20; color: Color red trans.
b nodes: RTObject withAllSubclasses.

b shape line color: Color blue trans.
es := b edges connectToAll: #dependentClasses.
b layout force charge: -500.
b normalizer 
    edges: es;
    normalizeLineWidthBasedOnOccurences: #dependentClassesWithOccurences.
b
bergel commented 5 years ago

Send to both VW-list and discord on 27/11/2018