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());
}
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));
}
Aggregations