VirtualFile file = e.getData(PlatformDataKeys.VIRTUAL_FILE);
if (file == null) {
Messages.showErrorDialog(project, "Cannot access file", ERROR_DIALOG_TITLE);
return;
}
ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(project);
if (vcsManager == null) {
Messages.showErrorDialog(project, "VCS is not enabled for project " + project.getName(), ERROR_DIALOG_TITLE);
return;
}
AbstractVcs vcs = vcsManager.getVcsFor(file);
if (!(vcs instanceof SvnVcs)) {
Messages.showErrorDialog(project, file.getName() + " is not managed by Subversion", ERROR_DIALOG_TITLE);
return;
}