protected void performAction(String name, String url) { Session session = Model.getSingleton().getSession(); if (context == null) { context = session.getNewContext(name); } // Manually create the UI shared contexts so any modifications are done // on an UI shared Context, so changes can be undone by pressing Cancel SessionDialog sessionDialog = View.getSingleton().getSessionDialog(); sessionDialog.recreateUISharedContexts(session); Context uiSharedContext = sessionDialog.getUISharedContext(context.getIndex()); uiSharedContext.addIncludeInContextRegex(url); // Show the session dialog without recreating UI Shared contexts View.getSingleton() .showSessionDialog(session, ContextIncludePanel.getPanelName(context.getIndex()), false); }