use of com.intellij.dvcs.repo.VcsRepositoryManager in project intellij-community by JetBrains.
the class VcsRepositoryManagerTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
cd(myProjectRoot);
myVcs = new MockAbstractVcs(myProject);
myProjectLevelVcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManager.getInstance(myProject);
myProjectLevelVcsManager.registerVcs(myVcs);
READY_TO_READ = new CountDownLatch(1);
CONTINUE_MODIFY = new CountDownLatch(1);
myMockCreator = createMockRepositoryCreator();
ExtensionPoint<VcsRepositoryCreator> point = getExtensionPoint();
point.registerExtension(myMockCreator);
myGlobalRepositoryManager = new VcsRepositoryManager(myProject, myProjectLevelVcsManager);
myGlobalRepositoryManager.initComponent();
}
use of com.intellij.dvcs.repo.VcsRepositoryManager in project intellij-community by JetBrains.
the class VcsPushAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
Project project = e.getRequiredData(CommonDataKeys.PROJECT);
VcsRepositoryManager manager = VcsRepositoryManager.getInstance(project);
Collection<Repository> repositories = e.getData(CommonDataKeys.EDITOR) != null ? ContainerUtil.<Repository>emptyList() : collectRepositories(manager, e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY));
VirtualFile selectedFile = DvcsUtil.getSelectedFile(project);
new VcsPushDialog(project, DvcsUtil.sortRepositories(repositories), selectedFile != null ? manager.getRepositoryForFile(selectedFile) : null).show();
}
Aggregations