Change in class blueprint

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Change in class blueprint

abergel
Hi!

I am updating some code found in class blueprint. I have migrated the method:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
createEdgesFor: aClass andLayers: layers on: view
        (RTEdge
                buildEdgesFromObjects: aClass incomingAccesses
                from: #from
                to: #to
                using:
                        (RTLine new
                                color: Color lightBlue;
                                attachPoint: RTHorizontalAttachPoint instance)
                inView: view) do: [ :each | each moveBehind: (layers flatCollect: #value) ].
        (RTEdge
                buildEdgesFromObjects: aClass outgoingInvocations
                from: #from
                to: [ :each | each candidates detect: [ :c | c typeScope = aClass ] ifNone: [ nil ] ]
                using: (RTLine new attachPoint: RTHorizontalAttachPoint instance)
                inView: view) do: [ :each | each moveBehind: (layers flatCollect: #value) ]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

to:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
createEdgesFor: aClass andLayers: layers on: view
        | eb edges to |
        eb := RTEdgeBuilder new.
        eb view: view.
        eb shape line; color: Color lightBlue; horizontalAttachPoint.
        edges := aClass incomingAccesses flatCollect: [ :acc | eb connectFrom: acc from to:  acc to ].
        edges do: [ :each | each moveBehind: (layers flatCollect: #value) ].
       
        eb := RTEdgeBuilder new.
        eb view: view.
        eb shape line; horizontalAttachPoint.
        to := [ :each | each candidates detect: [ :c | c typeScope = aClass ] ifNone: [ nil ] ].
        edges := aClass outgoingInvocations flatCollect: [ :acc |
                                eb connectFrom: acc from to:  (to value: acc) ].
        edges do: [ :each | each moveBehind: (layers flatCollect: #value) ]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I thought about a #source: on the EdgeBuilder, but I am not sure this will be really useful...

I think this does not change the behavior… but we never know.

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev