use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.
the class CheckoutWizard method doOKAction.
protected void doOKAction() {
CvsApplicationLevelConfiguration config = CvsApplicationLevelConfiguration.getInstance();
config.MAKE_CHECKED_OUT_FILES_READONLY = myChooseModeStep.getMakeNewFilesReadOnly();
config.CHECKOUT_PRUNE_EMPTY_DIRECTORIES = myChooseModeStep.getPruneEmptyDirectories();
final KeywordSubstitution keywordSubstitution = myChooseModeStep.getKeywordSubstitution();
if (keywordSubstitution == null) {
config.CHECKOUT_KEYWORD_SUBSTITUTION = null;
} else {
config.CHECKOUT_KEYWORD_SUBSTITUTION = keywordSubstitution.toString();
}
super.doOKAction();
}
use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.
the class CvsServicesImpl method saveRepository.
public boolean saveRepository(CvsRepository repository) {
CvsApplicationLevelConfiguration configuration = CvsApplicationLevelConfiguration.getInstance();
CvsRootConfiguration config = CvsRootConfiguration.createOn(repository);
if (configuration.CONFIGURATIONS.contains(config))
return false;
configuration.CONFIGURATIONS.add(config);
return configuration.CONFIGURATIONS.contains(config);
}
use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.
the class Cvs2SettingsEditPanel method saveTo.
public void saveTo(CvsRootConfiguration configuration) {
myCvsRootConfigurationPanelView.saveTo(configuration);
final CvsApplicationLevelConfiguration globalCvsSettings = CvsApplicationLevelConfiguration.getInstance();
if (!myExtConnectionSettingsEditor.equalsTo(configuration.EXT_CONFIGURATION, configuration.SSH_FOR_EXT_CONFIGURATION)) {
myExtConnectionSettingsEditor.saveTo(configuration.EXT_CONFIGURATION, configuration.SSH_FOR_EXT_CONFIGURATION);
myExtConnectionSettingsEditor.saveTo(globalCvsSettings.EXT_CONFIGURATION, globalCvsSettings.SSH_FOR_EXT_CONFIGURATION);
}
if (!mySshConnectionSettingsEditor.equalsTo(configuration.SSH_CONFIGURATION)) {
mySshConnectionSettingsEditor.saveTo(configuration.SSH_CONFIGURATION);
mySshConnectionSettingsEditor.saveTo(globalCvsSettings.SSH_CONFIGURATION);
}
if (!myLocalConnectionSettingsPanel.equalsTo(configuration.LOCAL_CONFIGURATION)) {
myLocalConnectionSettingsPanel.saveTo(configuration.LOCAL_CONFIGURATION);
myLocalConnectionSettingsPanel.saveTo(globalCvsSettings.LOCAL_CONFIGURATION);
}
if (!myProxySettingsNonEmptyPanel.equalsTo(configuration.PROXY_SETTINGS)) {
myProxySettingsNonEmptyPanel.saveTo(configuration.PROXY_SETTINGS);
myProxySettingsNonEmptyPanel.saveTo(globalCvsSettings.PROXY_SETTINGS);
}
myDateOrRevisionOrTagSettings.saveTo(configuration.DATE_OR_REVISION_SETTINGS);
}
use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.
the class SelectCvsConfigurationPanel method editConfigurations.
public void editConfigurations() {
final CvsApplicationLevelConfiguration configuration = CvsApplicationLevelConfiguration.getInstance();
final CvsConfigurationsListEditor cvsConfigurationsListEditor = new CvsConfigurationsListEditor(new ArrayList<>(configuration.CONFIGURATIONS), myProject);
final CvsRootConfiguration selectedConfiguration = getSelectedConfiguration();
if (selectedConfiguration != null) {
cvsConfigurationsListEditor.selectConfiguration(selectedConfiguration);
}
if (cvsConfigurationsListEditor.showAndGet()) {
configuration.CONFIGURATIONS = cvsConfigurationsListEditor.getConfigurations();
fillModel(cvsConfigurationsListEditor.getSelectedConfiguration());
}
}
use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.
the class CheckoutProjectOperation method create.
public static CheckoutProjectOperation create(CvsEnvironment env, String[] moduleName, File targetLocation, boolean useAlternativeCheckoutDir, boolean makeNewFilesReadOnly) {
final CvsApplicationLevelConfiguration config = CvsApplicationLevelConfiguration.getInstance();
final KeywordSubstitutionWrapper substitution = KeywordSubstitutionWrapper.getValue(config.CHECKOUT_KEYWORD_SUBSTITUTION);
final File root;
final String directory;
if (useAlternativeCheckoutDir && targetLocation.getParentFile() == null) {
root = targetLocation;
directory = getModuleRootName(moduleName);
} else if (useAlternativeCheckoutDir) {
root = targetLocation.getParentFile();
directory = targetLocation.getName();
} else {
root = targetLocation;
directory = null;
}
return new CheckoutProjectOperation(moduleName, env, makeNewFilesReadOnly, root, directory, config.CHECKOUT_PRUNE_EMPTY_DIRECTORIES, substitution == null ? null : substitution.getSubstitution());
}
Aggregations