use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class AbstractAction method performAction.
protected void performAction(final Project project, final CvsHandler handler, final CvsContext context) {
final CvsOperationExecutor executor = new CvsOperationExecutor(project);
executor.performActionSync(handler, new MyCvsOperationExecutorCallback(context, handler, executor));
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsCheckinEnvironment method commit.
public List<VcsException> commit(List<Change> changes, String preparedComment, @NotNull NullableFunction<Object, Object> parametersHolder, Set<String> feedback) {
final Collection<FilePath> filesList = ChangesUtil.getPaths(changes);
FilePath[] files = filesList.toArray(new FilePath[filesList.size()]);
final CvsOperationExecutor executor = new CvsOperationExecutor(myProject);
executor.setShowErrors(false);
final List<File> dirsToPrune = new ArrayList<>();
for (Change c : changes) {
if (c.getType() == Change.Type.DELETED) {
final ContentRevision contentRevision = c.getBeforeRevision();
assert contentRevision != null;
final FilePath path = contentRevision.getFile();
final FilePath parentPath = path.getParentPath();
if (parentPath != null) {
dirsToPrune.add(parentPath.getIOFile());
}
}
}
final CvsConfiguration cvsConfiguration = CvsConfiguration.getInstance(myProject);
CvsHandler handler = CommandCvsHandler.createCommitHandler(files, preparedComment, CvsBundle.message("operation.name.commit.file", files.length), cvsConfiguration.MAKE_NEW_FILES_READONLY, myProject, cvsConfiguration.TAG_AFTER_PROJECT_COMMIT, cvsConfiguration.TAG_AFTER_PROJECT_COMMIT_NAME, dirsToPrune);
executor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
return executor.getResult().getErrorsAndWarnings();
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsVcs2 method executeOperation.
public static void executeOperation(String title, CvsOperation operation, final Project project) throws VcsException {
CvsOperationExecutor executor = new CvsOperationExecutor(project);
executor.performActionSync(new CommandCvsHandler(title, operation), CvsOperationExecutorCallback.EMPTY);
CvsResult result = executor.getResult();
if (result.hasErrors()) {
throw result.composeError();
}
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class CvsVcs2 method executeQuietOperation.
public static CvsOperationExecutor executeQuietOperation(String title, CvsOperation operation, final Project project) {
CvsOperationExecutor executor = new CvsOperationExecutor(false, project, ModalityState.defaultModalityState());
executor.setIsQuietOperation(true);
executor.performActionSync(new CommandCvsHandler(title, operation), CvsOperationExecutorCallback.EMPTY);
return executor;
}
use of com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor in project intellij-community by JetBrains.
the class TagsHelper method getBranchesProvider.
private static BranchesProvider getBranchesProvider(CvsOperation operation, Project project) throws VcsException {
LOG.assertTrue(operation instanceof BranchesProvider);
final CvsOperationExecutor executor = new CvsOperationExecutor(true, project, new ModalityContextImpl(ModalityState.defaultModalityState()));
final CommandCvsHandler handler = new CommandCvsHandler(CvsBundle.message("load.tags.operation.name"), operation, true);
executor.performActionSync(handler, CvsOperationExecutorCallback.EMPTY);
final CvsResult executionResult = executor.getResult();
if (executionResult.hasErrors())
throw executionResult.composeError();
return (BranchesProvider) operation;
}
Aggregations