<commit_before>package view;

import components.TitanFrame;
import components.main.TitanToolBar;
import components.main.left.TitanLeftToolBar;
import components.main.left.TitanTree;
import components.main.right.TitanTable;
import components.menu.TitanFileMenu;
import components.menu.TitanMenuBar;
import components.menu.TitanViewMenu;
import controller.TitanMainController;

import javax.swing.*;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeModel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class TitanMainView {
    private TitanMainController controller;

    private TitanFrame titanFrame;
    private TitanMenuBar titanMenuBar;
    private TitanToolBar titanToolBar;
    private TitanLeftToolBar titanLeftToolBar;
    private TitanTree titanTree;
    private TitanTable titanTable;

    public TitanMainView(TitanMainController controller) {
        controller = controller;

        titanFrame = new TitanFrame();
        titanMenuBar = titanFrame.getTitanMenuBar();
        titanToolBar = titanFrame.getTitanToolBar();
        titanLeftToolBar = titanFrame.getTitanLeftPanel().getToolBar();
        titanTree = titanFrame.getTitanLeftPanel().getTree();
        titanTable = titanFrame.getTitanTable();

        initListeners(this.titanFrame);
    }

    public void showFrame() {
        this.titanFrame.setVisible(true);
    }

    public void setMenuBarEnabled(boolean enabled) {
        TitanFileMenu fileMenu = titanMenuBar.getTitanFileMenu();
        fileMenu.setEnabledAll(enabled);
        fileMenu.getNewDSMMenuItem().setEnabled(true);
        fileMenu.getOpenDSMMenuItem().setEnabled(true);
        fileMenu.getExitMenuItem().setEnabled(true);

        TitanViewMenu viewMenu = titanMenuBar.getTitanViewMenu();
        viewMenu.getRedrawMenuItem().setEnabled(enabled);
        viewMenu.getShowRowLabelMenuItem().setEnabled(enabled);
    }<commit_msg>hotfix TitanMainView constructor not initializing fields<commit_after>package view;

import components.TitanFrame;
import components.main.TitanToolBar;
import components.main.left.TitanLeftToolBar;
import components.main.left.TitanTree;
import components.main.right.TitanTable;
import components.menu.TitanFileMenu;
import components.menu.TitanMenuBar;
import components.menu.TitanViewMenu;
import controller.TitanMainController;

import javax.swing.*;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeModel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class TitanMainView {
    private TitanMainController controller;

    private TitanFrame titanFrame;
    private TitanMenuBar titanMenuBar;
    private TitanToolBar titanToolBar;
    private TitanLeftToolBar titanLeftToolBar;
    private TitanTree titanTree;
    private TitanTable titanTable;

    public TitanMainView(TitanMainController controller) {
        this.controller = controller;

        titanFrame = new TitanFrame();
        titanMenuBar = titanFrame.getTitanMenuBar();
        titanToolBar = titanFrame.getTitanToolBar();
        titanLeftToolBar = titanFrame.getTitanLeftPanel().getToolBar();
        titanTree = titanFrame.getTitanLeftPanel().getTree();
        titanTable = titanFrame.getTitanTable();

        initListeners(this.titanFrame);
    }

    public void showFrame() {
        this.titanFrame.setVisible(true);
    }

    public void setMenuBarEnabled(boolean enabled) {
        TitanFileMenu fileMenu = titanMenuBar.getTitanFileMenu();
        fileMenu.setEnabledAll(enabled);
        fileMenu.getNewDSMMenuItem().setEnabled(true);
        fileMenu.getOpenDSMMenuItem().setEnabled(true);
        fileMenu.getExitMenuItem().setEnabled(true);

        TitanViewMenu viewMenu = titanMenuBar.getTitanViewMenu();
        viewMenu.getRedrawMenuItem().setEnabled(enabled);
        viewMenu.getShowRowLabelMenuItem().setEnabled(enabled);
    }
{'fraction_non_alphanumeric': 0.0855361596009975, 'fraction_numerical': 0.0, 'mean_word_length': 4.412955465587045, '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': '331648', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1126, 'n_words': 195}