use of com.intellij.cvsSupport2.actions.cvsContext.CvsContext 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.actions.cvsContext.CvsContext 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.actions.cvsContext.CvsContext 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);
}
use of com.intellij.cvsSupport2.actions.cvsContext.CvsContext in project intellij-community by JetBrains.
the class BrowseCvsRepositoryAction method getCvsHandler.
@Override
protected CvsHandler getCvsHandler(CvsContext context) {
final SelectCvsConfigurationDialog selectCvsConfigurationDialog = new SelectCvsConfigurationDialog(context.getProject());
if (!selectCvsConfigurationDialog.showAndGet()) {
return CvsHandler.NULL;
}
mySelectedConfiguration = selectCvsConfigurationDialog.getSelectedConfiguration();
return new MyCvsHandler();
}
use of com.intellij.cvsSupport2.actions.cvsContext.CvsContext in project intellij-community by JetBrains.
the class BrowseCvsRepositoryAction method onActionPerformed.
@Override
protected void onActionPerformed(CvsContext context, CvsTabbedWindow tabbedWindow, boolean successfully, CvsHandler handler) {
if (mySelectedConfiguration == null)
return;
final Project project = context.getProject();
if (!loginImpl(context.getProject(), e -> VcsBalloonProblemNotifier.showOverChangesView(project, e.getMessage(), MessageType.WARNING)))
return;
super.onActionPerformed(context, tabbedWindow, successfully, handler);
if (successfully) {
LOG.assertTrue(project != null);
LOG.assertTrue(mySelectedConfiguration != null);
final BrowserPanel browserPanel = new BrowserPanel(mySelectedConfiguration, project, e -> VcsBalloonProblemNotifier.showOverChangesView(project, e.getMessage(), MessageType.ERROR));
tabbedWindow.addTab(TITLE, browserPanel, true, true, true, true, browserPanel.getActionGroup(), "cvs.browse");
}
}
Aggregations