I like this syntax:
b edges
connectFrom: RTObject withAllSubclasses;
if: [ :f :t | f == RTObject and: [ t numberOfMethods > 10 ] ].

I will try to implement it in my own builder to adapt with my project. Thanks =)


On Thu, May 15, 2014 at 1:11 AM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
First of all, bravo! Beautiful picture! I share it


What you are saying make perfect sense. My answer is that yes, you probably want this behavior. However, I think that your script is the right one since you are dealing with Roassal directly.
The visualization you want is not a simple one, so I suggest to use a builder for that. 

Here is an example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
b := RTGraphBuilder new.

b nodes
rectangle
size: #numberOfMethods; 
color: (Color blue alpha: 0.5).

b edges
connectFrom: RTObject withAllSubclasses;
if: [ :f :t | f == RTObject and: [ t numberOfMethods > 10 ] ].

b layout force. 
b global minSize: 5.
b addAll: RTObject withAllSubclasses.
b build.
b view
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Cheers,
Alexandre



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



On May 14, 2014, at 5:31 AM, Leo Perard <leo.perard@gmail.com> wrote:

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
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


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




--
Cheers,
Leo Perard
University of Lille 1