use of org.parosproxy.paros.model.Session in project zaproxy by zaproxy.
the class PopupMenuItemIncludeInContext method performHistoryReferenceActions.
@Override
public void performHistoryReferenceActions(List<HistoryReference> hrefs) {
Session session = Model.getSingleton().getSession();
if (context != null) {
recreateUISharedContexts(session);
}
super.performHistoryReferenceActions(hrefs);
// Show the session dialog without recreating UI Shared contexts
View.getSingleton().showSessionDialog(session, ContextIncludePanel.getPanelName(context.getId()), false);
}
use of org.parosproxy.paros.model.Session in project zaproxy by zaproxy.
the class PopupMenuItemSiteNodeContextMenuFactory method isButtonEnabledForSiteNode.
@Override
public boolean isButtonEnabledForSiteNode(SiteNode sn) {
final List<JMenuItem> mainPopupMenuItems = View.getSingleton().getPopupList();
for (ExtensionPopupMenuItem menu : subMenus) {
mainPopupMenuItems.remove(menu);
}
subMenus.clear();
// Add the existing contexts
Session session = Model.getSingleton().getSession();
List<Context> contexts = session.getContexts();
for (Context context : contexts) {
ExtensionPopupMenuItem piicm = getContextMenu(context, this.parentMenu);
piicm.setMenuIndex(this.getMenuIndex());
mainPopupMenuItems.add(piicm);
this.subMenus.add(piicm);
}
return false;
}
use of org.parosproxy.paros.model.Session in project zaproxy by zaproxy.
the class PopupMenuItemContextDataDriven method reCreateSubMenu.
protected void reCreateSubMenu(SiteNode sn) {
final List<JMenuItem> mainPopupMenuItems = View.getSingleton().getPopupList();
for (ExtensionPopupMenuItem menu : subMenus) {
mainPopupMenuItems.remove(menu);
}
subMenus.clear();
Session session = Model.getSingleton().getSession();
List<Context> contexts = session.getContexts();
for (Context context : contexts) {
if (context.isIncluded(sn)) {
ExtensionPopupMenuItem piicm = createPopupDataDrivenNodeMenu(context);
piicm.setMenuIndex(this.getMenuIndex());
mainPopupMenuItems.add(piicm);
this.subMenus.add(piicm);
}
}
}
use of org.parosproxy.paros.model.Session in project zaproxy by zaproxy.
the class PopupMenuItemContextExclude method reCreateSubMenu.
protected void reCreateSubMenu() {
final List<JMenuItem> mainPopupMenuItems = View.getSingleton().getPopupList();
for (ExtensionPopupMenuItem menu : subMenus) {
mainPopupMenuItems.remove(menu);
}
subMenus.clear();
Session session = Model.getSingleton().getSession();
List<Context> contexts = session.getContexts();
for (Context context : contexts) {
ExtensionPopupMenuItem piicm = createPopupExcludeFromContextMenu(context);
piicm.setMenuIndex(this.getMenuIndex());
mainPopupMenuItems.add(piicm);
this.subMenus.add(piicm);
}
}
use of org.parosproxy.paros.model.Session in project zaproxy by zaproxy.
the class PopupMenuItemExcludeFromContext method performHistoryReferenceActions.
@Override
public void performHistoryReferenceActions(List<HistoryReference> hrefs) {
Session session = Model.getSingleton().getSession();
// Manually create the UI shared contexts so any modifications are done
// on an UI shared Context, so changes can be undone by pressing Cancel
View.getSingleton().getSessionDialog().recreateUISharedContexts(session);
super.performHistoryReferenceActions(hrefs);
// Show the session dialog without recreating UI Shared contexts
View.getSingleton().showSessionDialog(session, ContextExcludePanel.getPanelName(context.getId()), false);
}
Aggregations