use of com.intellij.cvsSupport2.cvsoperations.cvsAdd.AddFilesOperation in project intellij-community by JetBrains.
the class RepositoryModificationOperation method addFile.
public void addFile(String folderPath, String name, KeywordSubstitution substitution) {
myAddedFilesCount++;
File file = new File(folderPath, name).getAbsoluteFile();
AddFileOperation addFilesOperation = new AddFileOperation(substitution);
addFilesOperation.addFile(file.getAbsolutePath());
addOperation(addFilesOperation);
if (file.isFile())
commitFile(file);
}
use of com.intellij.cvsSupport2.cvsoperations.cvsAdd.AddFilesOperation in project intellij-community by JetBrains.
the class CommandCvsHandler method createAddFilesHandler.
public static CvsHandler createAddFilesHandler(final Project project, Collection<AddedFileInfo> addedRoots) {
final AddFilesOperation operation = new AddFilesOperation();
final ArrayList<AddedFileInfo> addedFileInfo = new ArrayList<>();
for (final AddedFileInfo info : addedRoots) {
info.clearAllCvsAdminDirectoriesInIncludedDirectories();
addedFileInfo.addAll(info.collectAllIncludedFiles());
}
final ArrayList<VirtualFile> addedFiles = new ArrayList<>();
for (AddedFileInfo info : addedFileInfo) {
addedFiles.add(info.getFile());
operation.addFile(info.getFile(), info.getKeywordSubstitution());
}
return new CommandCvsHandler(CvsBundle.message("action.name.add"), operation, FileSetToBeUpdated.selectedFiles(VfsUtilCore.toVirtualFileArray(addedFiles)), VcsConfiguration.getInstance(project).getAddRemoveOption());
}
Aggregations