private void createNewConfiguration() { if (!saveSelectedConfiguration()) return; myList.setSelectedValue(null, false); CvsRootConfiguration newConfig = CvsApplicationLevelConfiguration.createNewConfiguration( CvsApplicationLevelConfiguration.getInstance()); myModel.addElement(newConfig); myList.setSelectedValue(newConfig, true); }
@Nullable public static CvsRootConfiguration reconfigureCvsRoot(String root, Project project) { CvsApplicationLevelConfiguration configuration = CvsApplicationLevelConfiguration.getInstance(); CvsRootConfiguration selectedConfig = configuration.getConfigurationForCvsRoot(root); ArrayList<CvsRootConfiguration> modifiableList = new ArrayList<CvsRootConfiguration>(configuration.CONFIGURATIONS); CvsConfigurationsListEditor editor = new CvsConfigurationsListEditor(modifiableList, project); editor.select(selectedConfig); editor.setReadOnly(); editor.show(); if (editor.isOK()) { configuration.CONFIGURATIONS = modifiableList; return configuration.getConfigurationForCvsRoot(root); } else { return null; } }