use of org.zaproxy.zap.extension.httppanel.view.HttpPanelView in project zaproxy by zaproxy.
the class HttpPanelComponentViewsManager method enableViews.
private void enableViews() {
Iterator<Entry<String, HttpPanelView>> it = views.entrySet().iterator();
while (it.hasNext()) {
HttpPanelView view = it.next().getValue();
ViewItem viewItem = viewItems.get(view.getName());
if (!view.isEnabled(message)) {
if (enabledViews.contains(viewItem)) {
disableView(viewItem);
}
} else if (!enabledViews.contains(viewItem)) {
enableView(viewItem);
}
}
}
use of org.zaproxy.zap.extension.httppanel.view.HttpPanelView in project zaproxy by zaproxy.
the class HttpPanelComponentViewsManager method findSearchableView.
private SearchableHttpPanelView findSearchableView() {
SearchableHttpPanelView searchableView = null;
Iterator<HttpPanelView> it = views.values().iterator();
while (it.hasNext()) {
HttpPanelView view = it.next();
if (view.isEnabled(message)) {
if (view instanceof SearchableHttpPanelView) {
searchableView = (SearchableHttpPanelView) view;
break;
}
}
}
return searchableView;
}
use of org.zaproxy.zap.extension.httppanel.view.HttpPanelView in project zaproxy by zaproxy.
the class SelectMessageLocationsPanel method removeView.
@Override
public void removeView(String componentName, String viewName, Object options) {
for (Iterator<HttpPanelView> it = views.iterator(); it.hasNext(); ) {
HttpPanelView httpPanelView = it.next();
if (viewName.equals(httpPanelView.getName())) {
((MessageLocationProducer) httpPanelView).removeFocusListener(focusListeners);
it.remove();
break;
}
}
super.removeView(componentName, viewName, options);
}
use of org.zaproxy.zap.extension.httppanel.view.HttpPanelView in project zaproxy by zaproxy.
the class AbstractMessageLocationsPanel method createMessagePanelEventListener.
protected MessagePanelEventListener createMessagePanelEventListener() {
return new MessagePanelEventListener() {
@Override
public void componentChanged(ComponentChangedEvent event) {
for (T entry : getModel().getElements()) {
MessageLocationHighlight highlight = entry.getHighlight();
if (highlight != null) {
MessageLocationHighlight highlightReference = selectMessageLocationsPanel.highlight(entry.getLocation(), highlight);
entry.setHighlightReference(highlightReference);
}
}
}
@Override
public void viewSelected(MessageViewSelectedEvent event) {
HttpPanelView view = event.getCurrentView();
if (view instanceof MessageLocationHighlighter) {
MessageLocationHighlighter highlighter = (MessageLocationHighlighter) view;
for (T entry : getModel().getElements()) {
MessageLocationHighlight highlight = entry.getHighlight();
if (highlight != null) {
MessageLocationHighlight highlightReference = highlighter.highlight(entry.getLocation(), highlight);
entry.setHighlightReference(highlightReference);
}
}
} else {
for (T entry : getModel().getElements()) {
entry.setHighlightReference(null);
}
}
}
};
}
use of org.zaproxy.zap.extension.httppanel.view.HttpPanelView in project zaproxy by zaproxy.
the class HttpPanelComponentViewsManager method removeView.
public void removeView(String viewName) {
HttpPanelView view = views.get(viewName);
if (view == null) {
return;
}
views.remove(viewName);
panelViews.remove(view.getPane());
ViewItem viewItem = viewItems.get(viewName);
if (enabledViews.contains(viewItem)) {
disableView(viewItem);
}
viewItems.remove(view.getName());
if (viewName.equals(currentView.getName())) {
if (enabledViews.size() > 0) {
switchView(enabledViews.get(0).getConfigName());
} else {
currentView = null;
}
}
}
Aggregations