Hi Antoine,

Simon suggested a good script. I would like something in it that you may find interesting.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| inhEdges |
view nodes: elements using: (MORectangleShape withBorder height:
#numberOfMethods; width: #numberOfAttributes; linearFillColor:
#numberOfLinesOfCode within: elements).


view shape: MOArrowedOrthoVerticalLineShape new.

inhEdges := view edges: elements from: #yourself toAll: #directSubclasses.


view shape: (MOArrowedLineShape new color: Color red); yourself.

view edges: elements from: #yourself toAll: #referencedClasses.

view treeLayout userDefinedEdges: inhEdges.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

The userDefinedEdges: takes in parameters the list of edges you want to see the layout driven by. I guess you want the tree layout to exhibit the inheritance link.

Cheers,
Alexandre

On 1 May 2009, at 22:49, Simon Denier wrote:


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



_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.