use of com.intellij.cvsSupport2.actions.cvsContext.CvsContext in project intellij-community by JetBrains.
the class CvsGlobalAction method update.
public void update(AnActionEvent e) {
final CvsContext cvsContext = CvsContextWrapper.createInstance(e);
final Presentation presentation = e.getPresentation();
if (cvsContext.cvsIsActive()) {
presentation.setVisible(true);
presentation.setEnabled(true);
} else {
presentation.setVisible(false);
presentation.setEnabled(false);
}
}
use of com.intellij.cvsSupport2.actions.cvsContext.CvsContext 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.actions.cvsContext.CvsContext in project intellij-community by JetBrains.
the class AbstractWatchAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
CvsConfiguration configuration = CvsConfiguration.getInstance(context.getProject());
WatcherDialog dialog = createDialog(configuration, context);
if (!dialog.showAndGet()) {
return CvsHandler.NULL;
}
Watch watch = dialog.getWatch();
saveWatch(configuration, watch);
WatchOperation watchOperation = new WatchOperation(getWatchOperation(), watch);
VirtualFile[] files = context.getSelectedFiles();
for (int i = 0; i < files.length; i++) {
watchOperation.addFile(files[i]);
}
return new CommandCvsHandler(getTitle(context), watchOperation);
}
use of com.intellij.cvsSupport2.actions.cvsContext.CvsContext in project intellij-community by JetBrains.
the class AbstractWatchOnOffAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
WatchOperation watchOperation = new WatchOperation(getMode());
VirtualFile[] files = context.getSelectedFiles();
for (VirtualFile file : files) {
watchOperation.addFile(file);
}
return new CommandCvsHandler(getTitle(context), watchOperation);
}
use of com.intellij.cvsSupport2.actions.cvsContext.CvsContext in project intellij-community by JetBrains.
the class CheckoutAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
final Project project = context.getProject();
CheckoutWizard checkoutWizard = new CheckoutWizard(project);
if (!checkoutWizard.showAndGet()) {
return CvsHandler.NULL;
}
myUseAlternativeCheckoutPath = checkoutWizard.useAlternativeCheckoutLocation();
myCheckoutDirectory = checkoutWizard.getCheckoutDirectory();
mySelectedElements = checkoutWizard.getSelectedElements();
return CommandCvsHandler.createCheckoutHandler(checkoutWizard.getSelectedConfiguration(), collectCheckoutPaths(), myCheckoutDirectory, myUseAlternativeCheckoutPath, CvsApplicationLevelConfiguration.getInstance().MAKE_CHECKED_OUT_FILES_READONLY, project == null ? null : VcsConfiguration.getInstance(project).getCheckoutOption());
}
Aggregations