There are two ways, but the currently supported way is to define the edges outside of the
forEach: block.
| packages classes allClasses |
packages := RPackageOrganizer default packages select: [ :p | p packageName
beginsWith: 'GT-' ].
allClasses := IdentitySet new.
packages do: [ :package | allClasses addAll: package classes ].
view shape rectangle.
view nodes: packages forEach: [ :aPackage |
view interaction action: #browse.
view shape rectangle
width: [:cls | cls instVarNames size * 3];
height: [:cls | cls methods size ];
fillColor: (RONColorLinearNormalizer
inContext: (allClasses)
withCommand: [:cls | cls methods inject: 0 into: [:sum :el | sum + el getSource
lineCount]]
lowColor: Color green highColor: Color red).
view nodes: aPackage classes.
view treeLayout ].
view edges:allClasses from: #superclass to: #yourself.
view gridLayout
Cheers,
Doru
On Mar 22, 2013, at 6:15 PM, Stephan Eggermont <stephan(a)stack.nl> wrote:
Hi,
I am trying to get the edges to superclass to cross the package boundary.
Could be related to Issue 845
Cheers,
Stephan
a roassal
title: 'Complexity';
painting: [:view|
| packages classes allClasses |
packages := RPackageOrganizer default packages select: [ :p | p packageName
beginsWith: 'Inno-' ].
allClasses := IdentitySet new.
packages do: [ :package | allClasses addAll: package classes ].
view shape rectangle.
view nodes: packages forEach: [ :aPackage |
view interaction action: #browse.
view shape rectangle
width: [:cls | cls instVarNames size * 3];
height: [:cls | cls methods size ];
fillColor: (RONColorLinearNormalizer
inContext: (allClasses)
withCommand: [:cls | cls methods inject: 0 into: [:sum :el | sum + el getSource
lineCount]]
lowColor: Color green highColor: Color red).
view nodes: aPackage classes.
view edgesFrom: #superclass.
view treeLayout ].
view gridLayout ]
<PastedGraphic-2.png>_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Every successful trip needs a suitable vehicle."