Search in sources :

Example 16 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class ExtensionSpider method getMenuItemCustomScan.

private ZapMenuItem getMenuItemCustomScan() {
    if (menuItemCustomScan == null) {
        menuItemCustomScan = new ZapMenuItem("menu.tools.spider", getView().getMenuShortcutKeyStroke(KeyEvent.VK_S, KeyEvent.ALT_DOWN_MASK, false));
        menuItemCustomScan.setEnabled(Control.getSingleton().getMode() != Mode.safe);
        menuItemCustomScan.addActionListener(e -> showSpiderDialog((Target) null));
    }
    return menuItemCustomScan;
}
Also used : Target(org.zaproxy.zap.model.Target) ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem)

Example 17 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class ExtensionSearch method getMenuItemPrev.

private ZapMenuItem getMenuItemPrev() {
    if (menuItemPrev == null) {
        menuItemPrev = new ZapMenuItem("menu.edit.search.previous.item", getView().getMenuShortcutKeyStroke(KeyEvent.VK_G, KeyEvent.SHIFT_DOWN_MASK, false));
        menuItemPrev.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                searchPanel.highlightPrevResult();
            }
        });
    }
    return menuItemPrev;
}
Also used : ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem)

Example 18 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class ExtensionSearch method getMenuItemNext.

private ZapMenuItem getMenuItemNext() {
    if (menuItemNext == null) {
        menuItemNext = new ZapMenuItem("menu.edit.search.next.item", getView().getMenuShortcutKeyStroke(KeyEvent.VK_G, 0, false));
        menuItemNext.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                searchPanel.highlightNextResult();
            }
        });
    }
    return menuItemNext;
}
Also used : ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem)

Example 19 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class ExtensionSearch method getMenuItemSearch.

private ZapMenuItem getMenuItemSearch() {
    if (menuItemSearch == null) {
        menuItemSearch = new ZapMenuItem("menu.edit.search.item", getView().getMenuShortcutKeyStroke(KeyEvent.VK_H, 0, false));
        menuItemSearch.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                searchPanel.searchFocus();
            }
        });
    }
    return menuItemSearch;
}
Also used : ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem)

Example 20 with ZapMenuItem

use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.

the class ExtensionBreak method getMenuDrop.

private ZapMenuItem getMenuDrop() {
    if (menuDrop == null) {
        menuDrop = new ZapMenuItem("menu.tools.brk.drop", getView().getMenuShortcutKeyStroke(KeyEvent.VK_X, 0, false));
        menuDrop.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                if (breakpointManagementInterface.isHoldMessage(null)) {
                    // Menu currently always enabled, but dont do anything unless a
                    // message is being held
                    breakpointManagementInterface.drop();
                }
            }
        });
    }
    return menuDrop;
}
Also used : ZapMenuItem(org.zaproxy.zap.view.ZapMenuItem)

Aggregations

ZapMenuItem (org.zaproxy.zap.view.ZapMenuItem)42 ActionEvent (java.awt.event.ActionEvent)14 Component (java.awt.Component)3 ActionListener (java.awt.event.ActionListener)2 JMenu (javax.swing.JMenu)2 JMenuItem (javax.swing.JMenuItem)2 Target (org.zaproxy.zap.model.Target)2 File (java.io.File)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 FileAlreadyExistsException (java.nio.file.FileAlreadyExistsException)1 JFileChooser (javax.swing.JFileChooser)1 JList (javax.swing.JList)1 JTree (javax.swing.JTree)1 FileFilter (javax.swing.filechooser.FileFilter)1 TreePath (javax.swing.tree.TreePath)1 ConfigurationException (org.apache.commons.configuration.ConfigurationException)1 HistoryReference (org.parosproxy.paros.model.HistoryReference)1 SiteNode (org.parosproxy.paros.model.SiteNode)1 HttpMessage (org.parosproxy.paros.network.HttpMessage)1