<commit_before>package org.nakedobjects.viewer.skylark.core;

import org.nakedobjects.object.Naked;
import org.nakedobjects.object.NakedCollection;
import org.nakedobjects.object.NakedObject;
import org.nakedobjects.utility.DebugInfo;
import org.nakedobjects.utility.DebugString;
import org.nakedobjects.utility.Dump;
import org.nakedobjects.viewer.skylark.Bounds;
import org.nakedobjects.viewer.skylark.CollectionContent;
import org.nakedobjects.viewer.skylark.Content;
import org.nakedobjects.viewer.skylark.ObjectContent;
import org.nakedobjects.viewer.skylark.View;


public class DebugView implements DebugInfo {
    private final View view;

    public DebugView(final View display) {
        this.view = display;
    }

    public String getDebugData() {
        DebugString debug = new DebugString();

        debug.append(view.getView());
        debug.blankLine();
        debug.blankLine();

        // display details
        debug.appendTitle("VIEW");

        debug.append(view.debugDetails());
        debug.append("\n");

        // content
        Content content = view.getContent();
        debug.appendTitle("CONTENT");
        if (content != null) {
            String type = content.getClass().getName();
            type = type.substring(type.lastIndexOf('.') + 1);
            debug.appendln(0, "Content", type);
            content.debugDetails(debug);
            debug.appendln(4, "Object", content.isObject());
            debug.appendln(4, "Collection", content.isCollection());
            debug.appendln(4, "Value", content.isValue());
        } else {
            debug.appendln(0, "Content", "none");
        }
        debug.blankLine();<commit_msg>Added icon name and window title details to the debug view<commit_after>package org.nakedobjects.viewer.skylark.core;

import org.nakedobjects.object.Naked;
import org.nakedobjects.object.NakedCollection;
import org.nakedobjects.object.NakedObject;
import org.nakedobjects.utility.DebugInfo;
import org.nakedobjects.utility.DebugString;
import org.nakedobjects.utility.Dump;
import org.nakedobjects.viewer.skylark.Bounds;
import org.nakedobjects.viewer.skylark.CollectionContent;
import org.nakedobjects.viewer.skylark.Content;
import org.nakedobjects.viewer.skylark.ObjectContent;
import org.nakedobjects.viewer.skylark.View;


public class DebugView implements DebugInfo {
    private final View view;

    public DebugView(final View display) {
        this.view = display;
    }

    public String getDebugData() {
        DebugString debug = new DebugString();

        debug.append(view.getView());
        debug.blankLine();
        debug.blankLine();

        // display details
        debug.appendTitle("VIEW");

        debug.append(view.debugDetails());
        debug.append("\n");

        // content
        Content content = view.getContent();
        debug.appendTitle("CONTENT");
        if (content != null) {
            String type = content.getClass().getName();
            type = type.substring(type.lastIndexOf('.') + 1);
            debug.appendln(0, "Content", type);
            content.debugDetails(debug);

            debug.appendln(4, "Icon name", content.getIconName());
            debug.appendln(4, "Window title", content.windowTitle());
             
            debug.appendln(4, "Object", content.isObject());
            debug.appendln(4, "Collection", content.isCollection());
            debug.appendln(4, "Value", content.isValue());
        } else {
            debug.appendln(0, "Content", "none");
        }
        debug.blankLine();
{'fraction_non_alphanumeric': 0.12412243751755125, 'fraction_numerical': 0.003931479921370402, 'mean_word_length': 2.914285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '419719', 'n_tokens_mistral': 1021, 'n_tokens_neox': 1007, 'n_words': 189}