Search in sources :

Example 1 with Status

use of org.zaproxy.zap.control.AddOn.Status in project zaproxy by zaproxy.

the class View method init.

//  ZAP: Removed method changeDisplayOption(int)
public void init() {
    OptionsParam options = Model.getSingleton().getOptionsParam();
    mainFrame = new MainFrame(options, getRequestPanel(), getResponsePanel());
    mainFrame.getWorkbench().addPanel(View.getSingleton().getSiteTreePanel(), WorkbenchPanel.PanelType.SELECT);
    // Install default editor and renderer for TextMessageLocationHighlight
    MessageLocationHighlightRenderersEditors.getInstance().addEditor(TextMessageLocationHighlight.class, new TextMessageLocationHighlightEditor());
    MessageLocationHighlightRenderersEditors.getInstance().addRenderer(TextMessageLocationHighlight.class, new TextMessageLocationHighlightRenderer());
    String statusString;
    for (Status status : AddOn.Status.values()) {
        //Try/catch in case AddOn.Status gets out of sync with cfu.status i18n entries
        try {
            statusString = Constant.messages.getString("cfu.status." + status.toString());
        } catch (MissingResourceException mre) {
            statusString = status.toString();
            String errString = "Caught " + mre.getClass().getName() + " " + mre.getMessage() + " when looking for i18n string: cfu.status." + statusString;
            if (Constant.isDevBuild()) {
                logger.error(errString);
            } else {
                logger.warn(errString);
            }
        }
        statusMap.put(status, new StatusUI(status, statusString));
    }
}
Also used : Status(org.zaproxy.zap.control.AddOn.Status) TextMessageLocationHighlightRenderer(org.zaproxy.zap.view.messagelocation.TextMessageLocationHighlightRenderer) StatusUI(org.zaproxy.zap.view.StatusUI) OptionsParam(org.parosproxy.paros.model.OptionsParam) MissingResourceException(java.util.MissingResourceException) TextMessageLocationHighlightEditor(org.zaproxy.zap.view.messagelocation.TextMessageLocationHighlightEditor)

Aggregations

MissingResourceException (java.util.MissingResourceException)1 OptionsParam (org.parosproxy.paros.model.OptionsParam)1 Status (org.zaproxy.zap.control.AddOn.Status)1 StatusUI (org.zaproxy.zap.view.StatusUI)1 TextMessageLocationHighlightEditor (org.zaproxy.zap.view.messagelocation.TextMessageLocationHighlightEditor)1 TextMessageLocationHighlightRenderer (org.zaproxy.zap.view.messagelocation.TextMessageLocationHighlightRenderer)1