Found the solution. The following code works as expected:

view nodes: (self getLevel: 3) "Returns all nodes on a certain level in the tree"
forEach: [ :each |
view nodes: each recursiveChildren: false. "The whole tree below me EXCLUDING myself"
view edges: each recursiveChildren: true "The whole tree below me INCLUDING myself"
       from: #yourself 
       toAll: [ :node | node children ].
view layout: (MOTreeMapLayoutIncubation withWeightBlock: [ :e | e model entity numberOfLinesOfCode ]).
].

The trick was to add the node itself to the edges. 
The view looks as expected, but the edges are rendered despite them having visibility set to false. Will investigate...

Cheers,
Dennis

On Wed, Apr 18, 2012 at 10:04, Dennis Schenk <d.schenk@students.unibe.ch> wrote:
Hi,

The second challenge I mentioned in the mail before is related to outgoing edges stored for MONodes.
When I create a layout in the following way...

view nodes: self nodes.
view edges: self nodes            
       from: [ :each | each ] 
       toAll: [ :each | each children ].
view layout: (MOTreeMapLayoutIncubation withWeightBlock: [ :e | e model entity numberOfLinesOfCode ]).

...Everything works as expected. Meaning every MONode has outgoing edges to its direct children defined.

However, if I construct a layout in the following way...

view nodes: (self getLevel: 3) "Returns all nodes on a certain level in the tree"
forEach: [ :each |
view nodes: each recursiveChildren. "All nodes below given node"
view edges: each recursiveChildren "From all nodes to all their direct children"
       from: [ :node | node ] 
       toAll: [ :node | node children ].
view layout: (MOTreeMapLayoutIncubation withWeightBlock: [ :e | e model entity numberOfLinesOfCode ]).
].


...So that I have multiple TreeMaps (one for each node on level 3 in the graph), the MONodes do not have outgoing edges defined and thus I can't render the TreeMap.

Does anyone have an idea what could cause this behavior?

Cheers,
Dennis