<commit_before>package view;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.KeyStroke;

public class MenuBar {
	private JMenuBar menuBar;
	private JMenu file, format, help;
	private JMenuItem open, save, changeColor, chooseTurtleImage;

	MenuBar(){
		//Create the menu bar.
		menuBar = new JMenuBar();
		file = new JMenu("File");
		format = new JMenu("Format");
		help = new JMenu("Help");

		addMenus();
		createAndAddMenuItems(); 
	}

	public void createAndAddMenuItems(){
		open = new JMenuItem("Open File",
				KeyEvent.VK_T);

		save = new JMenuItem("Save File",
				KeyEvent.VK_T);

		changeColor = new JMenuItem("Change Pen Color",
				KeyEvent.VK_T);

		chooseTurtleImage = new JMenuItem("Choose Turtle Image",
				KeyEvent.VK_T);
		
		file.add(open);
		file.add(save);
		format.add(changeColor);
		format.add(chooseTurtleImage); 
	}

	public void addMenus(){
		menuBar.add(file);
		menuBar.add(format);
		menuBar.add(help);
	}
	
	public JMenuBar getMenuBar() {
		return menuBar;
	}



}<commit_msg>Menus functionality completed<commit_after>package view;

import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;

import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFileChooser;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.KeyStroke;

public class MenuBar implements ActionListener {
	private JMenuBar menuBar;
	private JMenu file, format, help;
	private JMenuItem open, save, changeColor, chooseTurtleImage;
    private JFileChooser fileChooser;


	MenuBar(){
		//Create the menu bar.
		menuBar = new JMenuBar();
		file = new JMenu("File");
		format = new JMenu("Format");
		help = new JMenu("Help");
		fileChooser = new JFileChooser(); 

		addMenus();
		createAndAddMenuItems(); 
	}

	public void createAndAddMenuItems(){
		open = new JMenuItem("Open File",
				KeyEvent.VK_T);
		open.addActionListener(this); 

		save = new JMenuItem("Save File",
				KeyEvent.VK_T);
		save.addActionListener(this); 

		changeColor = new JMenuItem("Change Pen Color",
				KeyEvent.VK_T);
		changeColor.addActionListener(this); 


		chooseTurtleImage = new JMenuItem("Choose Turtle Image",
				KeyEvent.VK_T);
		chooseTurtleImage.addActionListener(this); 


		file.add(open);
		file.add(save);
		format.add(changeColor);
		format.add(chooseTurtleImage); 
	}

	public void addMenus(){
		menuBar.add(file);
		menuBar.add(format);
		menuBar.add(help);
	}

	public JMenuBar getMenuBar() {
		return menuBar;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		int temp; 
		Component temp1 = null; 
		if(e.getSource() == open){
			temp = fileChooser.showOpenDialog(temp1);

		}
		if(e.getSource() == save){
			temp = fileChooser.showSaveDialog(temp1);

		}
		if(e.getSource() == changeColor){

		}
		if(e.getSource() == chooseTurtleImage){

		}
	}



}
{'fraction_non_alphanumeric': 0.121414913957935, 'fraction_numerical': 0.0009560229445506692, 'mean_word_length': 4.4214162348877375, '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': '5682479', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1054, 'n_words': 230}