<commit_before>package com.mbrlabs.mundus.ui.components.dialogs;

import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.ui.ButtonGroup;
import com.badlogic.gdx.scenes.scene2d.ui.CheckBox;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.kotcrab.vis.ui.widget.*;
import com.mbrlabs.mundus.core.Mundus;
import com.mbrlabs.mundus.core.data.home.ProjectRef;
import com.mbrlabs.mundus.ui.components.RadioButtonGroup;

/**
 * @author <NAME>
 * @version 28-11-2015
 */
public class OpenProjectDialog extends BaseDialog {

    private VisTextField path;
    private VisTextButton openBtn;
    private RadioButtonGroup<ProjectRef> projectList;

    public OpenProjectDialog() {
        super("Open Project");
        setModal(true);


        VisTable root = new VisTable();
        root.padTop(6).padRight(6).padBottom(22);
        add(root);

        projectList = new RadioButtonGroup<>();
        projectList.left();
        ScrollPane scrollPane = new VisScrollPane(projectList);
        scrollPane.setScrollingDisabled(true, false);
        scrollPane.setFadeScrollBars(false);

        root.add(scrollPane).minWidth(350).maxHeight(400).left().row();

        for(ProjectRef project : Mundus.home.getProjectRefs().getProjects()) {
            String text = project.getName() + " [" + project.getPath() + "]";
            RadioButtonGroup.RadioButton btn = new RadioButtonGroup.RadioButton(text, project);
            projectList.add(btn);
        }

        openBtn = new VisTextButton("Open");
        root.add(openBtn).width(93).height(25).padTop(15);

        setupListeners();
    }

    private void setupListeners() {

        openBtn.addListener(new ClickListener() {
            @Override
            public void clicked(InputEvent event, float x, float y) {
                RadioButtonGroup.RadioButton selected = projectList.getButtonGroup().getChecked();
                ProjectRef projectRef = (ProjectRef)selected.getRefObject();
                System.out.println(projectRef.getName());
            }
        });

    }



}<commit_msg>open project<commit_after>package com.mbrlabs.mundus.ui.components.dialogs;

import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.ui.ButtonGroup;
import com.badlogic.gdx.scenes.scene2d.ui.CheckBox;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.kotcrab.vis.ui.widget.*;
import com.mbrlabs.mundus.core.Mundus;
import com.mbrlabs.mundus.core.data.home.ProjectRef;
import com.mbrlabs.mundus.ui.components.RadioButtonGroup;

/**
 * @author <NAME>
 * @version 28-11-2015
 */
public class OpenProjectDialog extends BaseDialog {

    private VisTextField path;
    private VisTextButton openBtn;
    private RadioButtonGroup<ProjectRef> projectList;

    public OpenProjectDialog() {
        super("Open Project");
        setModal(true);


        VisTable root = new VisTable();
        root.padTop(6).padRight(6).padBottom(22);
        add(root);

        projectList = new RadioButtonGroup<>();
        projectList.left();
        ScrollPane scrollPane = new VisScrollPane(projectList);
        scrollPane.setScrollingDisabled(true, false);
        scrollPane.setFadeScrollBars(false);

        root.add(scrollPane).minWidth(350).maxHeight(400).left().row();

        for(ProjectRef project : Mundus.home.getProjectRefs().getProjects()) {
            String text = project.getName() + " [" + project.getPath() + "]";
            RadioButtonGroup.RadioButton btn = new RadioButtonGroup.RadioButton(text, project);
            projectList.add(btn);
        }

        openBtn = new VisTextButton("Open");
        root.add(openBtn).width(93).height(25).padTop(15);

        setupListeners();
    }

    private void setupListeners() {

        openBtn.addListener(new ClickListener() {
            @Override
            public void clicked(InputEvent event, float x, float y) {
                RadioButtonGroup.RadioButton selected = projectList.getButtonGroup().getChecked();
                ProjectRef projectRef = (ProjectRef)selected.getRefObject();
                close();
                Mundus.ui.getLoadingProjectDialog().loadProjectAsync(projectRef);
            }
        });

    }



}
{'fraction_non_alphanumeric': 0.12024736601007788, 'fraction_numerical': 0.013284470911589555, 'mean_word_length': 3.0397779833487513, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7592001', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1281, 'n_words': 202}