use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.
the class ManualHttpRequestEditorDialog method getMenuItem.
@Override
public ZapMenuItem getMenuItem() {
if (menuItem == null) {
menuItem = new ZapMenuItem("menu.tools.manReq", View.getSingleton().getMenuShortcutKeyStroke(KeyEvent.VK_M, 0, false));
menuItem.setIcon(ExtensionManualRequestEditor.getIcon());
menuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Message message = getMessage();
if (message == null) {
setDefaultMessage();
} else if (message instanceof HttpMessage && ((HttpMessage) message).getRequestHeader().isEmpty()) {
setDefaultMessage();
}
setVisible(true);
}
});
}
return menuItem;
}
use of org.zaproxy.zap.view.ZapMenuItem in project zaproxy by zaproxy.
the class ExtensionLog4j method getMenuGarbageCollect.
private ZapMenuItem getMenuGarbageCollect() {
if (menuGarbageCollect == null) {
menuGarbageCollect = new ZapMenuItem("log4j.tools.menu.gc");
menuGarbageCollect.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
Runtime.getRuntime().gc();
}
});
}
return menuGarbageCollect;
}
Aggregations