On 1 mai 09, at 21:32, Antoine Cailliau wrote:
Dear all,
I'm trying to use Moose but I didn't found documentation about the
scription in Easel. I try to get a map of all classes of my project
with the call links. If a method of a class call to an other method of
an other class I would like to have an edge between the two classes.
Can someone help me ? Here is the code I currently have:
view nodes: classGroup using: (RectangleShape withBorder height:
#numberOfMethods; width: #numberOfAttributes; linearFillColor:
#numberOfLinesOfCode within: classGroup).
view edges: classGroup from: #yourself toAll: #directSubclasses.
view treeLayout.
Hi Antoine
It's pretty simple if you have the right packages already loaded
Just replace directSubclasses with referencedClasses and you will be
done.
If #referencedClasses is unknown, you need to load the Cook bundle
from the SCG store (for VW) or the Moose-Cook package from
squeaksource/Moose (for Pharo)
view nodes: elements using: (MORectangleShape withBorder height:
#numberOfMethods; width: #numberOfAttributes; linearFillColor:
#numberOfLinesOfCode within: elements).
view edges: elements from: #yourself toAll: #referencedClasses.
view treeLayout.
If you want both the inheritance and the calls, a basic way would be:
view nodes: elements using: (MORectangleShape withBorder height:
#numberOfMethods; width: #numberOfAttributes; linearFillColor:
#numberOfLinesOfCode within: elements).
view shape: MOArrowedOrthoVerticalLineShape new.
view edges: elements from: #yourself toAll: #directSubclasses.
view shape: (MOArrowedLineShape new color: Color red); yourself.
view edges: elements from: #yourself toAll: #referencedClasses.
view treeLayout.
More stuff is possible with nested nodes.
--
Simon