use of com.intellij.cvsSupport2.history.ComparableVcsRevisionOnOperation in project intellij-community by JetBrains.
the class CvsServicesImpl method openInEditor.
public void openInEditor(Project project, CvsModule cvsFile) {
CvsRepository repository = cvsFile.getRepository();
RevisionOrDate revisionOrDate = RevisionOrDateImpl.createOn(new DateOrRevisionSettings().updateFrom(repository.getDateOrRevision()));
GetFileContentOperation operation = new GetFileContentOperation(new File(cvsFile.getPathInCvs()), CvsRootConfiguration.createOn(repository), revisionOrDate);
ComparableVcsRevisionOnOperation revision = new ComparableVcsRevisionOnOperation(operation, project);
VcsVirtualFile vcsVirtualFile = new VcsVirtualFile(cvsFile.getPathInCvs(), revision, VcsFileSystem.getInstance());
OpenFileDescriptor openFileDescriptor = new OpenFileDescriptor(project, vcsVirtualFile);
FileEditorManager.getInstance(project).openTextEditor(openFileDescriptor, false);
}
use of com.intellij.cvsSupport2.history.ComparableVcsRevisionOnOperation in project intellij-community by JetBrains.
the class CvsServicesImpl method createCvsVersionOn.
private static ComparableVcsRevisionOnOperation createCvsVersionOn(CvsModule module, Project project) {
final CvsRootConfiguration rootConfiguration = CvsApplicationLevelConfiguration.getInstance().getConfigurationForCvsRoot(module.getRepository().getStringRepresentation());
CvsConnectionSettings env = new IDEARootFormatter(rootConfiguration).createConfiguration();
GetFileContentOperation operation = new GetFileContentOperation(new File(module.getPathInCvs()), env, new SimpleRevision(module.getRevision()));
return new ComparableVcsRevisionOnOperation(operation, project);
}
Aggregations