Search in sources :

Example 1 with HttpBreakpointManagementDaemonImpl

use of org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointManagementDaemonImpl in project zaproxy by zaproxy.

the class ExtensionBreak method hook.

@Override
public void hook(ExtensionHook extensionHook) {
    super.hook(extensionHook);
    extensionHook.addOptionsParamSet(getOptionsParam());
    extensionHook.addProxyListener(getProxyListenerBreak());
    extensionHook.addSessionListener(this);
    extensionHook.addOptionsChangedListener(this);
    API.getInstance().registerApiImplementor(api);
    if (getView() != null) {
        breakPanel = new BreakPanel(this, getOptionsParam());
        breakPanel.setName(Constant.messages.getString("tab.break"));
        breakpointMessageHandler = new BreakpointMessageHandler2(breakPanel);
        breakpointMessageHandler.setEnabledBreakpoints(getBreakpointsModel().getBreakpointsEnabledList());
        breakpointManagementInterface = breakPanel;
        ExtensionHookView pv = extensionHook.getHookView();
        pv.addWorkPanel(breakPanel);
        pv.addOptionPanel(getOptionsPanel());
        extensionHook.getHookView().addStatusPanel(getBreakpointsPanel());
        extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuEdit());
        extensionHook.getHookMenu().addPopupMenuItem(getPopupMenuDelete());
        mapBreakpointUiManager = new HashMap<>();
        mapMessageUiManager = new HashMap<>();
        httpBreakpoints = new HttpBreakpointsUiManagerInterface(extensionHook.getHookMenu(), this);
        addBreakpointsUiManager(httpBreakpoints);
        extensionHook.getHookMenu().addToolsMenuItem(getMenuToggleBreakOnRequests());
        extensionHook.getHookMenu().addToolsMenuItem(getMenuToggleBreakOnResponses());
        extensionHook.getHookMenu().addToolsMenuItem(getMenuStep());
        extensionHook.getHookMenu().addToolsMenuItem(getMenuContinue());
        extensionHook.getHookMenu().addToolsMenuItem(getMenuDrop());
        extensionHook.getHookMenu().addToolsMenuItem(getMenuAddHttpBreakpoint());
        ExtensionHelp.enableHelpKey(breakPanel, "ui.tabs.break");
        ExtensionHelp.enableHelpKey(getBreakpointsPanel(), "ui.tabs.breakpoints");
    } else {
        this.breakpointManagementInterface = new HttpBreakpointManagementDaemonImpl();
        breakpointMessageHandler = new BreakpointMessageHandler2(breakpointManagementInterface);
        breakpointMessageHandler.setEnabledBreakpoints(new ArrayList<BreakpointMessageInterface>());
    }
}
Also used : HttpBreakpointManagementDaemonImpl(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointManagementDaemonImpl) ExtensionHookView(org.parosproxy.paros.extension.ExtensionHookView) HttpBreakpointsUiManagerInterface(org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointsUiManagerInterface)

Aggregations

ExtensionHookView (org.parosproxy.paros.extension.ExtensionHookView)1 HttpBreakpointManagementDaemonImpl (org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointManagementDaemonImpl)1 HttpBreakpointsUiManagerInterface (org.zaproxy.zap.extension.brk.impl.http.HttpBreakpointsUiManagerInterface)1