Search in sources :

Example 1 with CvsRootConfiguration

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

the class SelectCvsElementStep method preNextCheck.

@Override
public boolean preNextCheck() {
    final CvsRootConfiguration selectedConfiguration = mySelectCVSConfigurationStep.getSelectedConfiguration();
    if (selectedConfiguration == null) {
        return false;
    }
    final boolean logged = isLogged(selectedConfiguration);
    if (logged) {
        myCvsTree.setCvsRootConfiguration((CvsRootConfiguration) selectedConfiguration.clone());
    }
    return logged;
}
Also used : CvsRootConfiguration(com.intellij.cvsSupport2.config.CvsRootConfiguration)

Example 2 with CvsRootConfiguration

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

the class CheckoutWizard method getConfigurationWithDateOrRevisionSettings.

public CvsRootConfiguration getConfigurationWithDateOrRevisionSettings() {
    final CvsRootConfiguration configuration = getSelectedConfiguration().clone();
    myChooseModeStep.saveDateOrRevisionSettings(configuration);
    return configuration;
}
Also used : CvsRootConfiguration(com.intellij.cvsSupport2.config.CvsRootConfiguration)

Example 3 with CvsRootConfiguration

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

the class ChooseCheckoutMode method activate.

@Override
public void activate() {
    final File selectedLocation = getWizard().getSelectedLocation();
    final Collection<File> cvsPaths = getSelectedFiles();
    if (!FileUtil.filesEqual(selectedLocation, mySelectedLocation) || !Comparing.equal(cvsPaths, myCvsPaths)) {
        mySelectedLocation = selectedLocation;
        myCvsPaths.clear();
        myCvsPaths.addAll(cvsPaths);
        if (myCvsPaths.size() == 1) {
            show(LIST);
            rebuildList();
        } else {
            setStepTitle(CvsBundle.message("info.text.selected.modules.will.be.checked.out.to"));
            final StringBuilder message = composeLocationsMessage();
            myMessage.setText(message.toString());
            show(MESSAGE);
            getWizard().updateButtons();
        }
    } else if (selectedLocation == null) {
        getWizard().updateButtons();
    }
    final CvsRootConfiguration configuration = getWizard().getSelectedConfiguration();
    if (myConfiguration != configuration) {
        myDateOrRevisionOrTagSettings.updateFrom(configuration.DATE_OR_REVISION_SETTINGS);
        myConfiguration = configuration;
    }
}
Also used : File(java.io.File) CvsFile(com.intellij.cvsSupport2.cvsBrowser.CvsFile) CvsRootConfiguration(com.intellij.cvsSupport2.config.CvsRootConfiguration)

Example 4 with CvsRootConfiguration

use of com.intellij.cvsSupport2.config.CvsRootConfiguration 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 5 with CvsRootConfiguration

use of com.intellij.cvsSupport2.config.CvsRootConfiguration 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)

Aggregations

CvsRootConfiguration (com.intellij.cvsSupport2.config.CvsRootConfiguration)14 CvsApplicationLevelConfiguration (com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration)5 File (java.io.File)3 ArrayList (java.util.ArrayList)3 CvsConnectionSettings (com.intellij.cvsSupport2.connections.CvsConnectionSettings)2 IDEARootFormatter (com.intellij.cvsSupport2.connections.IDEARootFormatter)2 ProxySettings (com.intellij.cvsSupport2.config.ProxySettings)1 CvsConfigurationsListEditor (com.intellij.cvsSupport2.config.ui.CvsConfigurationsListEditor)1 CvsRootException (com.intellij.cvsSupport2.connections.CvsRootException)1 CvsLoginWorker (com.intellij.cvsSupport2.connections.login.CvsLoginWorker)1 CvsFile (com.intellij.cvsSupport2.cvsBrowser.CvsFile)1 LoginPerformer (com.intellij.cvsSupport2.cvsoperations.common.LoginPerformer)1 GetFileContentOperation (com.intellij.cvsSupport2.cvsoperations.cvsContent.GetFileContentOperation)1 SimpleRevision (com.intellij.cvsSupport2.cvsoperations.dateOrRevision.SimpleRevision)1 ComparableVcsRevisionOnOperation (com.intellij.cvsSupport2.history.ComparableVcsRevisionOnOperation)1 MigrateRootDialog (com.intellij.cvsSupport2.ui.MigrateRootDialog)1 AccessToken (com.intellij.openapi.application.AccessToken)1 ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)1 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1 Task (com.intellij.openapi.progress.Task)1