use of com.intellij.cvsSupport2.cvshandlers.CvsHandler in project intellij-community by JetBrains.
the class GetFileFromRepositoryAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
CvsLightweightFile[] cvsLightweightFiles = context.getSelectedLightweightFiles();
Project project = context.getProject();
if (cvsLightweightFiles != null) {
boolean makeNewFilesReadOnly = project != null && CvsConfiguration.getInstance(project).MAKE_NEW_FILES_READONLY;
return CommandCvsHandler.createGetFileFromRepositoryHandler(cvsLightweightFiles, makeNewFilesReadOnly);
}
final FilePath[] filePaths = context.getSelectedFilePaths();
if (filePaths != null) {
CvsConfiguration cvsConfiguration = CvsConfiguration.getInstance(project);
// do not use -j's
final UpdateSettingsOnCvsConfiguration updateSettings = new UpdateSettingsOnCvsConfiguration(cvsConfiguration, cvsConfiguration.CLEAN_COPY, cvsConfiguration.RESET_STICKY);
return CommandCvsHandler.createUpdateHandler(filePaths, updateSettings, project, UpdatedFiles.create());
}
return CvsHandler.NULL;
}
use of com.intellij.cvsSupport2.cvshandlers.CvsHandler in project intellij-community by JetBrains.
the class ImportAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
final VirtualFile selectedFile = context.getSelectedFile();
final ImportWizard importWizard = new ImportWizard(context.getProject(), selectedFile);
if (!importWizard.showAndGet()) {
return CvsHandler.NULL;
}
myImportDetails = importWizard.createImportDetails();
if (myImportDetails == null)
return CvsHandler.NULL;
return CommandCvsHandler.createImportHandler(myImportDetails);
}
use of com.intellij.cvsSupport2.cvshandlers.CvsHandler in project intellij-community by JetBrains.
the class ImportAction method onActionPerformed.
protected void onActionPerformed(CvsContext context, CvsTabbedWindow tabbedWindow, boolean successfully, CvsHandler handler) {
super.onActionPerformed(context, tabbedWindow, successfully, handler);
final ImportConfiguration importConfiguration = ImportConfiguration.getInstance();
if (successfully && importConfiguration.CHECKOUT_AFTER_IMPORT) {
createCheckoutAction(importConfiguration.MAKE_NEW_FILES_READ_ONLY).actionPerformed(context);
}
}
use of com.intellij.cvsSupport2.cvshandlers.CvsHandler in project intellij-community by JetBrains.
the class ViewEditorsAction method onActionPerformed.
protected void onActionPerformed(CvsContext context, CvsTabbedWindow tabbedWindow, boolean successfully, CvsHandler handler) {
super.onActionPerformed(context, tabbedWindow, successfully, handler);
if (successfully) {
List<EditorInfo> editors = myEditorsOperation.getEditors();
String filePath = CvsVfsUtil.getFileFor(context.getSelectedFile()).getAbsolutePath();
final Project project = context.getProject();
if (project == null) {
return;
}
if (editors.isEmpty()) {
VcsBalloonProblemNotifier.showOverChangesView(project, CvsBundle.message("message.error.no.editors.for.file", filePath), MessageType.INFO);
} else {
tabbedWindow.addTab(CvsBundle.message("message.editors.for.file", filePath), new EditorsPanel(project, editors), true, true, true, true, null, "cvs.editors");
}
}
}
use of com.intellij.cvsSupport2.cvshandlers.CvsHandler in project intellij-community by JetBrains.
the class BranchAction method getCvsHandler.
protected CvsHandler getCvsHandler(CvsContext context) {
final FilePath[] selectedFiles = context.getSelectedFilePaths();
final Project project = context.getProject();
final CreateTagDialog dialog = new CreateTagDialog(selectedFiles, project, false);
if (!dialog.showAndGet()) {
return CvsHandler.NULL;
}
final boolean makeNewFilesReadOnly = CvsConfiguration.getInstance(project).MAKE_NEW_FILES_READONLY;
return CommandCvsHandler.createBranchHandler(selectedFiles, dialog.getTagName(), dialog.switchToThisBranch(), dialog.getOverrideExisting(), makeNewFilesReadOnly, project);
}
Aggregations