use of com.intellij.openapi.cvsIntegration.CvsRepository 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.openapi.cvsIntegration.CvsRepository in project intellij-community by JetBrains.
the class ModuleChooser method getSelectedModules.
public CvsModule[] getSelectedModules() {
CvsRepository repository = getSelectedRepository();
CvsElement[] selectedCvsElement = mySelectCvsElementStep.getSelectedCvsElements();
ArrayList<CvsModule> result = new ArrayList<>();
for (CvsElement cvsElement : selectedCvsElement) {
result.add(new CvsModule(repository, cvsElement.getElementPath(), cvsElement instanceof CvsFile));
}
return result.toArray(new CvsModule[result.size()]);
}
Aggregations