Search in sources :

Example 1 with CvsApplicationLevelConfiguration

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();
}
Also used : CvsApplicationLevelConfiguration(com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration) KeywordSubstitution(org.netbeans.lib.cvsclient.command.KeywordSubstitution)

Example 2 with CvsApplicationLevelConfiguration

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);
}
Also used : CvsApplicationLevelConfiguration(com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration) CvsRootConfiguration(com.intellij.cvsSupport2.config.CvsRootConfiguration)

Example 3 with CvsApplicationLevelConfiguration

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);
}
Also used : CvsApplicationLevelConfiguration(com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration)

Example 4 with CvsApplicationLevelConfiguration

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());
    }
}
Also used : CvsApplicationLevelConfiguration(com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration) CvsRootConfiguration(com.intellij.cvsSupport2.config.CvsRootConfiguration)

Example 5 with CvsApplicationLevelConfiguration

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());
}
Also used : CvsApplicationLevelConfiguration(com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration) KeywordSubstitutionWrapper(com.intellij.cvsSupport2.keywordSubstitution.KeywordSubstitutionWrapper) File(java.io.File)

Aggregations

CvsApplicationLevelConfiguration (com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration)7 CvsRootConfiguration (com.intellij.cvsSupport2.config.CvsRootConfiguration)4 KeywordSubstitutionWrapper (com.intellij.cvsSupport2.keywordSubstitution.KeywordSubstitutionWrapper)2 CvsConfigurationsListEditor (com.intellij.cvsSupport2.config.ui.CvsConfigurationsListEditor)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1 Nullable (org.jetbrains.annotations.Nullable)1 KeywordSubstitution (org.netbeans.lib.cvsclient.command.KeywordSubstitution)1