ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader();
ExtensionHookView hookView = extensionHook.getHookView();
ExtensionHookMenu hookMenu = extensionHook.getHookMenu();
// setup WebSocket tab
WebSocketPanel wsPanel = getWebSocketPanel();
wsPanel.setDisplayPanel(getView().getRequestPanel(), getView().getResponsePanel());
extensionHook.addSessionListener(wsPanel.getSessionListener());
addAllChannelObserver(wsPanel);
ExtensionHelp.enableHelpKey(wsPanel, "websocket.tab");
hookView.addStatusPanel(getWebSocketPanel());
// setup Options Panel
hookView.addOptionPanel(getOptionsPanel());
// add 'Exclude from WebSockets' menu item to WebSocket tab context menu
hookMenu.addPopupMenuItem(new ExcludeFromWebSocketsMenuItem(this, storage.getTable()));
// setup Session Properties
sessionExcludePanel = new SessionExcludeFromWebSocket(this);
getView().getSessionDialog().addParamPanel(new String[]{}, sessionExcludePanel, false);
// setup Breakpoints
ExtensionBreak extBreak = (ExtensionBreak) extLoader.getExtension(ExtensionBreak.NAME);
if (extBreak != null) {
// setup custom breakpoint handler
BreakpointMessageHandler wsBrkMessageHandler = new WebSocketBreakpointMessageHandler(extBreak.getBreakPanel(), config);
wsBrkMessageHandler.setEnabledBreakpoints(extBreak.getBreakpointsEnabledList());
// listen on new messages such that breakpoints can apply
addAllChannelObserver(new WebSocketProxyListenerBreak(this, wsBrkMessageHandler));
// pop up to add the breakpoint
hookMenu.addPopupMenuItem(new PopupMenuAddBreakWebSocket(extBreak));
extBreak.addBreakpointsUiManager(getBrkManager());
}
// setup replace payload filter
wsFilterListener = new WebSocketFilterListener();
addAllChannelObserver(wsFilterListener);
payloadFilter = new FilterWebSocketPayload(this, wsPanel.getChannelsModel());
addWebSocketFilter(payloadFilter);
// setup fuzzable extension
ExtensionFuzz extFuzz = (ExtensionFuzz) extLoader.getExtension(ExtensionFuzz.NAME);
if (extFuzz != null) {