<commit_before>//=========================================
//  <NAME>
//  AUT University 2015
//  https://github.com/denkers/graphi
//=========================================

package com.graphi.display;

import com.sun.glass.events.KeyEvent;
import java.awt.event.ActionListener;
import java.util.HashMap;
import java.util.Map;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

/**
 * The default menu bar attached to Window.frame
 */
public class MainMenu extends JMenuBar
{
    protected final JMenu fileMenu;
    protected final JMenu helpMenu;
    protected final JMenu optionsMenu;
    protected final JMenu graphMenu;
    protected final JMenu loggingMenu;
    protected final JMenu vertexMenu, edgeMenu;
    protected final JMenu viewMenu;
    protected final JMenu pluginMenu;
    protected Map<String, JMenuItem> menuItems;
    protected PluginsMenu pluginsListMenu;
    private static MainMenu instance;

    public MainMenu()
    {
        menuItems           =   new HashMap<>();
        fileMenu            =   new JMenu("File");
        optionsMenu         =   new JMenu("Options");
        helpMenu            =   new JMenu("About");
        graphMenu           =   new JMenu("Graph");
        loggingMenu         =   new JMenu("Log");
        vertexMenu          =   new JMenu("Vertex");
        edgeMenu            =   new JMenu("Edge");
        viewMenu            =   new JMenu("View");
        pluginMenu          =   new JMenu("Plugin");
        pluginsListMenu     =   new PluginsMenu();
        
        //----------------------------------------------------------------------
        //  ADD MENU ITEMS
        //----------------------------------------------------------------------;
        //- Menu items are stored in the menuItems map for later indexing
        //- Use getMenuItem for access to an item
        
        addMenuItem("mainMenuItem", new JMenuItem("Menu"), fileMenu);
        addMenuItem("miniItem", new JMenuItem("Minimize"), fileMenu);
        addMenuItem("maxItem", new JMenuItem("Maximize"), fileMenu);
        addMenuItem("exitItem", new JMenuItem("Exit"), fileMenu);
        addMenuItem("aboutItem", new JMenuItem("Author"), helpMenu);
        addMenuItem("importGraphItem", new JMenuItem("Import Graph"), graphMenu);
        addMenuItem("exportGraphItem", new JMenuItem("Export Graph"), graphMenu);
        addMenuItem("importLogItem", new JMenuItem("Import Log"), loggingMenu);
        addMenuItem("exportLogItem", new JMenuItem("Export Log"), loggingMenu);
        addMenuItem("vLabelsItem", new JMenuItem("Vertex labels"), viewMenu);
        addMenuItem("eLabelsItem", new JMenuItem("Eedge labels"), viewMenu);
        addMenuItem("viewerBGItem", new JMenuItem("Change viewer background"), optionsMenu);
        addMenuItem("edgeBGItem", new JMenuItem("Change edge fill"), optionsMenu);
        addMenuItem("vertexBGItem", new JMenuItem("Change Vertex fill"), optionsMenu);
        addMenuItem("clearLogItem", new JMenuItem("Clear"), loggingMenu);
        addMenuItem("resetGraphItem", new JMenuItem("Reset"), graphMenu);
        addMenuItem("addVertexItem", new JMenuItem("Add"), vertexMenu);
        addMenuItem("editVertexItem", new JMenuItem("Edit"), vertexMenu);
        addMenuItem("removeVertexItem", new JMenuItem("Remove"), vertexMenu);
        addMenuItem("addEdgeItem", new JMenuItem("Add"), edgeMenu);
        addMenuItem("editEdgeItem", new JMenuItem("Edit"), edgeMenu);
        addMenuItem("removeEdgeItem", new JMenuItem("Remove"), edgeMenu);
        addMenuItem("searchObjectItem", new JMenuItem("Search", KeyEvent.VK_S), graphMenu);
        //----------------------------------------------------------------------
        
        graphMenu.add(vertexMenu);
        graphMenu.add(edgeMenu);
        pluginMenu.add(pluginsListMenu);
        pluginMenu.addSeparator();
        addMenuItem("loadPluginItem", new JMenuItem("Load"), pluginMenu);
        
        add(fileMenu);
        add(graphMenu);
        add(loggingMenu);
        add(viewMenu);
        add(optionsMenu);
        add(helpMenu);
        add(pluginMenu);
    }
    
    public void showAbout()<commit_msg>Updated display.MainMenu with modified menus and sub-menu items<commit_after>//=========================================
//  <NAME>
//  AUT University 2015
//  https://github.com/denkers/graphi
//=========================================

package com.graphi.display;

import com.sun.glass.events.KeyEvent;
import java.awt.event.ActionListener;
import java.util.HashMap;
import java.util.Map;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

/**
 * The default menu bar attached to Window.frame
 */
public class MainMenu extends JMenuBar
{
    protected final JMenu fileMenu;
    protected final JMenu dataMenu;
    protected final JMenu graphMenu;
    protected final JMenu pluginMenu;
    protected final JMenu viewMenu;
    protected final JMenu aboutMenu;
    
    protected final JMenu helpMenu;
    protected final JMenu optionsMenu;
    protected final JMenu loggingMenu;
    protected final JMenu vertexMenu, edgeMenu;
    protected final JMenu exportTableMenu;
    protected Map<String, JMenuItem> menuItems;
    protected PluginsMenu pluginsListMenu;
    private static MainMenu instance;

    public MainMenu()
    {
        menuItems           =   new HashMap<>();
        fileMenu            =   new JMenu("File");
        graphMenu           =   new JMenu("Graph");
        viewMenu            =   new JMenu("View");
        pluginMenu          =   new JMenu("Plugin");
        dataMenu            =   new JMenu("Data");
        aboutMenu           =   new JMenu("About");
        exportTableMenu     =   new JMenu("Export table");  
        
        optionsMenu         =   new JMenu("Options");
        helpMenu            =   new JMenu("About");
        loggingMenu         =   new JMenu("Log");
        vertexMenu          =   new JMenu("Vertex");
        edgeMenu            =   new JMenu("Edge");
        pluginsListMenu     =   new PluginsMenu();
        
        //----------------------------------------------------------------------
        //  ADD MENU ITEMS
        //----------------------------------------------------------------------;
        //- Menu items are stored in the menuItems map for later indexing
        //- Use getMenuItem for access to an item
        
        //File menu items
        addMenuItem("mainMenuItem", new JMenuItem("Menu"), fileMenu);
        addMenuItem("settingsItem", new JMenuItem("Settings"), fileMenu);
        addMenuItem("newProjectItem", new JMenuItem("New Project"), fileMenu);
        addMenuItem("openProjectItem", new JMenuItem("Open Project"), fileMenu);
        addMenuItem("miniItem", new JMenuItem("Minimize"), fileMenu);
        addMenuItem("maxItem", new JMenuItem("Maximize"), fileMenu);
        addMenuItem("exitItem", new JMenuItem("Exit"), fileMenu);
        
        //Graph menu items
        addMenuItem("importGraphItem", new JMenuItem("Import Graph"), graphMenu);
        addMenuItem("exportGraphItem", new JMenuItem("Export Graph"), graphMenu);
        addMenuItem("resetGraphItem", new JMenuItem("Reset"), graphMenu);
        
        //Vertex sub menu items
        addMenuItem("addVertexItem", new JMenuItem("Add"), vertexMenu);
        addMenuItem("editVertexItem", new JMenuItem("Edit"), vertexMenu);
        addMenuItem("removeVertexItem", new JMenuItem("Remove"), vertexMenu);
        
        //Edge  sub menu items
        addMenuItem("addEdgeItem", new JMenuItem("Add"), edgeMenu);
        addMenuItem("editEdgeItem", new JMenuItem("Edit"), edgeMenu);
        addMenuItem("removeEdgeItem", new JMenuItem("Remove"), edgeMenu);
        
        //Data menu items
        addMenuItem("searchObjectItem", new JMenuItem("Search", KeyEvent.VK_S), dataMenu);
        addMenuItem("exportLogItem", new JMenuItem("Export Log"), dataMenu);
        addMenuItem("clearLogItem", new JMenuItem("Clear"), dataMenu);
        
        //Export table menu items
        addMenuItem("exportVerticesItem", new JMenuItem("Vertices table"), exportTableMenu);
        addMenuItem("exportEdgesItem", new JMenuItem("Edges table"), exportTableMenu);
        addMenuItem("exportComputationsItem", new JMenuItem("Computations table"), exportTableMenu);
        
        //View menu items
        addMenuItem("showToolsItem", new JMenuItem("Tools"), viewMenu);
        addMenuItem("showVisuals", new JMenuItem("Visuals"), viewMenu);
        addMenuItem("vLabelsItem", new JMenuItem("Vertex labels"), viewMenu);
        addMenuItem("eLabelsItem", new JMenuItem("Edge labels"), viewMenu);
        
        
        //About menu items
        addMenuItem("aboutItem", new JMenuItem("Author"), aboutMenu);
        addMenuItem("documentationItem", new JMenuItem("Documentation"), aboutMenu);
        addMenuItem("licenseItem", new JMenuItem("License"), aboutMenu);
        addMenuItem("repositoryItem", new JMenuItem("Repository"), aboutMenu);
        
        //----------------------------------------------------------------------
        
        graphMenu.add(vertexMenu);
        graphMenu.add(edgeMenu);
        dataMenu.add(exportTableMenu);
        pluginMenu.add(pluginsListMenu);
        pluginMenu.addSeparator();
        addMenuItem("loadPluginItem", new JMenuItem("Import plugin"), pluginMenu);
        addMenuItem("managePluginsItem", new JMenuItem("Manage plugins"), pluginMenu);
        
        add(fileMenu);
        add(graphMenu);
        add(loggingMenu);
        add(viewMenu);
        add(optionsMenu);
        add(helpMenu);
        add(pluginMenu);
    }
    
    public void showAbout()
{'fraction_non_alphanumeric': 0.1663831915957979, 'fraction_numerical': 0.0008004002001000501, 'mean_word_length': 2.5036803364879074, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '1196109', 'n_tokens_mistral': 2470, 'n_tokens_neox': 2443, 'n_words': 622}