private void createNewConfiguration() { if (!saveSelectedConfiguration()) return; myList.setSelectedValue(null, false); CvsRootConfiguration newConfig = CvsApplicationLevelConfiguration.createNewConfiguration( CvsApplicationLevelConfiguration.getInstance()); myModel.addElement(newConfig); myList.setSelectedValue(newConfig, true); }
public void saveTo(CvsApplicationLevelConfiguration config) { myPServerSettingsPanel.saveTo(config); String oldEncoding = config.ENCODING; config.ENCODING = myCharset.getSelectedItem().toString(); if (!Comparing.equal(oldEncoding, config.ENCODING)) { CvsEntriesManager.getInstance().encodingChanged(); } config.USE_GZIP = myUseGZIPCompression.isSelected(); config.DO_OUTPUT = myLogOutput.isSelected(); config.SEND_ENVIRONMENT_VARIABLES_TO_SERVER = mySendEnvironment.isSelected(); }
@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; } }