<commit_before>package org.apache.isis.client.kroviz.core.aggregator

import org.apache.isis.client.kroviz.core.event.LogEntry
import org.apache.isis.client.kroviz.core.model.DisplayModelWithLayout
import org.apache.isis.client.kroviz.layout.Layout
import org.apache.isis.client.kroviz.to.Represention
import org.apache.isis.client.kroviz.to.TObject
import org.apache.isis.client.kroviz.ui.core.Constants
import org.apache.isis.client.kroviz.ui.diagram.Tree

abstract class AggregatorWithLayout : BaseAggregator() {
    // parentUrl is to be set in update
    // and to be used in subsequent invocations
    var parentUrl: String? = null
    var tree: Tree? = null

    override fun update(logEntry: LogEntry, subType: String) {
        parentUrl = logEntry.url
    }

    protected fun handleLayout(layout: Layout, dm: DisplayModelWithLayout, referrer: String) {
        console.log("[CA.handleLayout] TODO ISIS-2846")
        console.log(layout)
        if (dm.layout == null) {
            dm.addLayout(layout)
            dm.properties.propertyLayoutList.forEach { p ->
                val l = p.link
                if (l == null) {
                    console.log(p.id + " link empty")  // ISIS-2846
                } else {
                    val isDn = l.href.contains("datanucleus")
                    if (!isDn) {
                        //invoking DN links leads to an error
                        invoke(l, this, referrer = referrer)
                    }
                }<commit_msg>ISIS-2846 Extensions.actionScope added<commit_after>package org.apache.isis.client.kroviz.core.aggregator

import org.apache.isis.client.kroviz.core.event.LogEntry
import org.apache.isis.client.kroviz.core.model.DisplayModelWithLayout
import org.apache.isis.client.kroviz.layout.Layout
import org.apache.isis.client.kroviz.to.Represention
import org.apache.isis.client.kroviz.to.TObject
import org.apache.isis.client.kroviz.ui.core.Constants
import org.apache.isis.client.kroviz.ui.diagram.Tree

abstract class AggregatorWithLayout : BaseAggregator() {
    // parentUrl is to be set in update
    // and to be used in subsequent invocations
    var parentUrl: String? = null
    var tree: Tree? = null

    override fun update(logEntry: LogEntry, subType: String) {
        parentUrl = logEntry.url
    }

    protected fun handleLayout(layout: Layout, dm: DisplayModelWithLayout, referrer: String) {
        if (dm.layout == null) {
            dm.addLayout(layout)
            dm.properties.propertyLayoutList.forEach { p ->
                val l = p.link!!
                val isDn = l.href.contains("datanucleus")
                if (!isDn) {
                    //invoking DN links leads to an error
                    invoke(l, this, referrer = referrer)
                }
{'fraction_non_alphanumeric': 0.10003598416696653, 'fraction_numerical': 0.004318100035984167, 'mean_word_length': 2.353437876960193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5634274', 'n_tokens_mistral': 868, 'n_tokens_neox': 827, 'n_words': 180}