Search in sources :

Example 1 with CvsConfigurationsListEditor

use of com.intellij.cvsSupport2.config.ui.CvsConfigurationsListEditor 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 2 with CvsConfigurationsListEditor

use of com.intellij.cvsSupport2.config.ui.CvsConfigurationsListEditor 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 3 with CvsConfigurationsListEditor

use of com.intellij.cvsSupport2.config.ui.CvsConfigurationsListEditor 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)3 CvsRootConfiguration (com.intellij.cvsSupport2.config.CvsRootConfiguration)3 CvsConfigurationsListEditor (com.intellij.cvsSupport2.config.ui.CvsConfigurationsListEditor)1 ArrayList (java.util.ArrayList)1 Nullable (org.jetbrains.annotations.Nullable)1