Search in sources :

Example 1 with KeywordSubstitutionWrapper

use of com.intellij.cvsSupport2.keywordSubstitution.KeywordSubstitutionWrapper 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)

Example 2 with KeywordSubstitutionWrapper

use of com.intellij.cvsSupport2.keywordSubstitution.KeywordSubstitutionWrapper 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)

Aggregations

KeywordSubstitutionWrapper (com.intellij.cvsSupport2.keywordSubstitution.KeywordSubstitutionWrapper)2 CvsApplicationLevelConfiguration (com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration)1 File (java.io.File)1