protected void doOKAction() { for (Configurable configurable : myEnvToConfMap.values()) { try { configurable.apply(); } catch (CancelledConfigurationException e) { return; } catch (ConfigurationException e) { Messages.showErrorDialog( myProject, VcsBundle.message("messge.text.cannot.save.settings", e.getLocalizedMessage()), getRealTitle()); return; } } super.doOKAction(); }
protected void doHelpAction() { String helpTopic = null; final Collection<Configurable> v = myEnvToConfMap.values(); final Configurable[] configurables = v.toArray(new Configurable[v.size()]); if (myMainPanel instanceof JTabbedPane) { final int tabIndex = ((JTabbedPane) myMainPanel).getSelectedIndex(); if (tabIndex >= 0 && tabIndex < configurables.length) { helpTopic = configurables[tabIndex].getHelpTopic(); } } else { helpTopic = configurables[0].getHelpTopic(); } if (helpTopic != null) { HelpManager.getInstance().invokeHelp(helpTopic); } else { super.doHelpAction(); } }
protected void doOKAction() { for (FileInfo info : myFiles) { if (myUsingFileSystemRadioButton.isSelected()) { info.getHandleType().selectFirst(); } else if (info.hasVersionControl()) { info.getHandleType().select(info.getHandleType().get(1)); } } ArrayList<FileInfo> files = new ArrayList<FileInfo>(); Collections.addAll(files, myFiles); String changelist = (String) myChangelist.getSelectedItem(); ReadonlyStatusHandlerImpl.processFiles(files, changelist); if (files.isEmpty()) { super.doOKAction(); } else { myFiles = files.toArray(new FileInfo[files.size()]); initFileList(); } }