<commit_before>import { Component, AfterContentInit } from '@angular/core';

declare var $: JQueryStatic;

export class File {
    public id: number;
    public name: string;
    public content: string;
}

@Component({
    selector: 'hedgehog-ide',
    templateUrl: 'app/app.component.html'
})

export class AppComponent implements AfterContentInit {

    private filetree = [
        {
            name: 'root1',
            children: [
                { id: 1, name: 'child1' },
                { id: 2, name: 'child2' },
                { name: 'childfolder', children:
                    [
                        { id: 3, name: 'child3', content: "asdfasdf"},
                        { id: 4, name: 'child4' },
                    ]
                }
            ]
        }
    ];

    private files = [];

    private lastId: any = 0;

    private editorContent: string = '';

    public ngAfterContentInit(): void {
        this.iterateTree(this.filetree[0]);
    }

    public onTabSelect(id: number): void {
        this.files[this.lastId].content = this.editorContent;
        this.editorContent = this.files[id].content;
        this.lastId = id;
    }

    public changeEditorContent (editorContent) {
        this.editorContent = editorContent;
    }

    public fileTreeEvent(event) {
        function updateIndicator(element){
            let indicatorDiv = $('.indicator').first();
            indicatorDiv.css(
                {
                    left: $(element).position().left,
                    right: $(element).parent().width() - ($(element).position().left + $(element).width())
                }
            );
        }

        if(event.node.children == null) {

            this.onTabSelect(event.node.data.id - 1);


            let tab = $('#tab' + event.node.data.id);

            if (tab.length > 0) {
                updateIndicator(tab);
                return;
            }<commit_msg>add missing whitespace<commit_after>import { Component, AfterContentInit } from '@angular/core';

declare var $: JQueryStatic;

export class File {
    public id: number;
    public name: string;
    public content: string;
}

@Component({
    selector: 'hedgehog-ide',
    templateUrl: 'app/app.component.html'
})

export class AppComponent implements AfterContentInit {

    private filetree = [
        {
            name: 'root1',
            children: [
                { id: 1, name: 'child1' },
                { id: 2, name: 'child2' },
                { name: 'childfolder', children:
                    [
                        { id: 3, name: 'child3', content: "asdfasdf"},
                        { id: 4, name: 'child4' },
                    ]
                }
            ]
        }
    ];

    private files = [];

    private lastId: any = 0;

    private editorContent: string = '';

    public ngAfterContentInit(): void {
        this.iterateTree(this.filetree[0]);
    }

    public onTabSelect(id: number): void {
        this.files[this.lastId].content = this.editorContent;
        this.editorContent = this.files[id].content;
        this.lastId = id;
    }

    public changeEditorContent (editorContent) {
        this.editorContent = editorContent;
    }

    public fileTreeEvent(event) {

        function updateIndicator(element) {
            let indicatorDiv = $('.indicator').first();
            indicatorDiv.css(
                {
                    left: $(element).position().left,
                    right: $(element).parent().width() - ($(element).position().left + $(element).width())
                }
            );
        }

        if(event.node.children == null) {

            this.onTabSelect(event.node.data.id - 1);

            let tab = $('#tab' + event.node.data.id);

            if (tab.length > 0) {
                updateIndicator(tab);
                return;
            }
{'fraction_non_alphanumeric': 0.1288153129849974, 'fraction_numerical': 0.006725297465080186, 'mean_word_length': 1.5883534136546185, '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': '4417245', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1029, 'n_words': 224}