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>());
}
}
Aggregations