Search in sources :

Example 6 with CvsApplicationLevelConfiguration

use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.

the class CvsConfigurationPanel method updateFrom.

public void updateFrom(CvsConfiguration config, CvsApplicationLevelConfiguration appLevelConfiguration) {
    myConfigurations = new ArrayList<>(appLevelConfiguration.CONFIGURATIONS);
    myShowOutput.setSelected(config.SHOW_OUTPUT);
    myMakeNewFilesReadOnly.setSelected(config.MAKE_NEW_FILES_READONLY);
    myOnFileMergedWithConflictGroup[config.SHOW_CORRUPTED_PROJECT_FILES].setSelected(true);
    myDefaultTextFileKeywordSubstitution.removeAllItems();
    for (final KeywordSubstitutionWrapper keywordSubstitution : KeywordSubstitutionWrapper.values()) {
        myDefaultTextFileKeywordSubstitution.addItem(keywordSubstitution);
    }
    myDefaultTextFileKeywordSubstitution.setSelectedItem(KeywordSubstitutionWrapper.getValue(config.DEFAULT_TEXT_FILE_SUBSTITUTION));
}
Also used : KeywordSubstitutionWrapper(com.intellij.cvsSupport2.keywordSubstitution.KeywordSubstitutionWrapper)

Example 7 with CvsApplicationLevelConfiguration

use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.

the class CvsConfigurationsListEditor method reconfigureCvsRoot.

@Nullable
public static CvsRootConfiguration reconfigureCvsRoot(String root, Project project) {
    final CvsApplicationLevelConfiguration configuration = CvsApplicationLevelConfiguration.getInstance();
    final CvsRootConfiguration selectedConfig = configuration.getConfigurationForCvsRoot(root);
    final ArrayList<CvsRootConfiguration> modifiableList = new ArrayList<>(configuration.CONFIGURATIONS);
    final CvsConfigurationsListEditor editor = new CvsConfigurationsListEditor(modifiableList, project, true);
    editor.select(selectedConfig);
    if (editor.showAndGet()) {
        configuration.CONFIGURATIONS = modifiableList;
        return configuration.getConfigurationForCvsRoot(root);
    } else {
        return null;
    }
}
Also used : CvsApplicationLevelConfiguration(com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration) ArrayList(java.util.ArrayList) CvsRootConfiguration(com.intellij.cvsSupport2.config.CvsRootConfiguration) Nullable(org.jetbrains.annotations.Nullable)

Example 8 with CvsApplicationLevelConfiguration

use of com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration in project intellij-community by JetBrains.

the class ConfigureCvsRootsAction method actionPerformed.

public void actionPerformed(AnActionEvent e) {
    final CvsApplicationLevelConfiguration configuration = CvsApplicationLevelConfiguration.getInstance();
    final List<CvsRootConfiguration> configurations = configuration.CONFIGURATIONS;
    final CvsConfigurationsListEditor cvsConfigurationsListEditor = new CvsConfigurationsListEditor(new ArrayList<>(configurations), e.getProject());
    if (cvsConfigurationsListEditor.showAndGet()) {
        configuration.CONFIGURATIONS = cvsConfigurationsListEditor.getConfigurations();
    }
}
Also used : CvsApplicationLevelConfiguration(com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration) CvsConfigurationsListEditor(com.intellij.cvsSupport2.config.ui.CvsConfigurationsListEditor) CvsRootConfiguration(com.intellij.cvsSupport2.config.CvsRootConfiguration)

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