Search in sources :

Example 1 with SqlChecker

use of catdata.opl.SqlChecker in project fql by CategoricalData.

the class GUI method makesToolsMenu.

private static Menu makesToolsMenu() {
    Menu toolsMenu = new Menu("Tools");
    MenuItem runItem = new MenuItem("Run");
    toolsMenu.add(runItem);
    runItem.addActionListener(e -> {
        CodeEditor<?, ?, ?> ed = getSelectedEditor();
        if (ed != null) {
            ed.runAction();
        }
    });
    KeyStroke ctrlR = KeyStroke.getKeyStroke(KeyEvent.VK_R, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
    MenuShortcut q2 = new MenuShortcut(ctrlR.getKeyCode());
    runItem.setShortcut(q2);
    MenuItem abortItem = new MenuItem("Abort");
    toolsMenu.add(abortItem);
    abortItem.addActionListener(e -> abortAction());
    MenuItem optionsItem = new MenuItem("Options");
    toolsMenu.add(optionsItem);
    optionsItem.addActionListener(e -> IdeOptions.showOptions());
    MenuItem optionsItem2 = new MenuItem("Legacy options");
    toolsMenu.add(optionsItem2);
    optionsItem2.addActionListener(e -> DefunctGlobalOptions.showOptions());
    MenuItem chaseItem = new MenuItem("ED Chaser");
    toolsMenu.add(chaseItem);
    chaseItem.addActionListener(x -> Chase.dostuff());
    MenuItem sqlLoaderItem = new MenuItem("SQL Loader");
    toolsMenu.add(sqlLoaderItem);
    sqlLoaderItem.addActionListener(x -> SqlLoader.showLoader());
    MenuItem sqlMapperItem = new MenuItem("SQL Mapper");
    toolsMenu.add(sqlMapperItem);
    sqlMapperItem.addActionListener(x -> SqlMapper.showGuesser());
    MenuItem sqlCheckItem = new MenuItem("SQL Checker");
    toolsMenu.add(sqlCheckItem);
    sqlCheckItem.addActionListener(x -> new SqlChecker());
    MenuItem shredItem = new MenuItem("NR Shredder");
    toolsMenu.add(shredItem);
    shredItem.addActionListener(x -> new NraViewer());
    MenuItem easikItem = new MenuItem("EASIK");
    toolsMenu.add(easikItem);
    easikItem.addActionListener(x -> easik.Easik.main(new String[0]));
    return toolsMenu;
}
Also used : KeyStroke(javax.swing.KeyStroke) MenuItem(java.awt.MenuItem) Menu(java.awt.Menu) MenuShortcut(java.awt.MenuShortcut) NraViewer(catdata.nested.NraViewer) SqlChecker(catdata.opl.SqlChecker)

Aggregations

NraViewer (catdata.nested.NraViewer)1 SqlChecker (catdata.opl.SqlChecker)1 Menu (java.awt.Menu)1 MenuItem (java.awt.MenuItem)1 MenuShortcut (java.awt.MenuShortcut)1 KeyStroke (javax.swing.KeyStroke)1