Hi,
I just noticed that I can't build edges between two elements if their model
do no have "smalltalk link".
I try to be more explicit with a stupid example.
I want to display RTObject and all its subclasses. And I want an edges
between the classes with less than 10 methods and those which have have
more than 100 methods. (I'm agree this is stupid this is just for the
example).
The only way to do that is to use the method RTEdge class>>#from:toAll:
I can't use the building methods like RTEdge
class>>#edgesFromObject:from:to:using:inView.
Here the code from the example :
view := RTView new.
objects := RTObject withAllSubclasses.
elements := (RTBox new size: #numberOfMethods; color: (Color blue alpha:
0.5)) elementsOn: objects.
elements @ RTPopup new.
view addAll: elements.
from := objects select: [ :o | o numberOfMethods < 10 ].
to := objects select: [ :o | o numberOfMethods >= 100].
from := view elementsFromModels: from.
to := view elementsFromModels: to.
from do: [ :el | view add: (RTEdge from: el toAll: to) + RTLine ].
RTForceBasedLayout on: elements.
view @ RTDraggableView .
view open
Maybe I am wrong and this is the way to proceed but sometime we don't want
edges between elements which represents a smalltalk link.
I really don't know if my request has sense. As I'm new I do not know
exactly if there is a sense to build those kind of edges so this is not
only a question about Roassal but also a question about software analysis.
--
Cheers,
Leo Perard
University of Lille 1