Exemple #1
0
        internal async Task OpenTracker()
        {
            Debug.WriteLine("==== Open Tracker");
            RepositoryManager.Instance.Clear();
            _fileCache            = new SccProviderSolutionCache(_sccProvider);
            _fileChangesetManager = new ConcurrentDictionary <GitRepository, GitChangesetManager>();

            var solutionFileName = await GetSolutionFileName();

            await RepositoryManager.Instance.SetSolutionTracker(solutionFileName);

            await _statusBarManager.SetActiveRepository(RepositoryManager.Instance.SolutionTracker);

            await SetSolutionExplorerTitle();

            RepositoryName = RepositoryManager.Instance?.SolutionTracker?.Name;

            if (!string.IsNullOrEmpty(solutionFileName))
            {
                await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

                var projects = await SolutionExtensions.GetLoadedControllableProjects();

                foreach (var vsSccProject2 in projects)
                {
                    await AddProject(vsSccProject2 as IVsHierarchy);
                }
            }
        }
Exemple #2
0
        private async Task ReloadAllGlyphs()
        {
            var projects = await SolutionExtensions.GetLoadedControllableProjects();

            await Task.Run(async delegate
            {
                await RefreshSolutionGlyphs();
                await RefreshProjectGlyphs(projects);
            });
        }
        private async Task ScanSolution()
        {
            var projects = await SolutionExtensions.GetLoadedControllableProjects();

            //TODO MAke sure I want to do this
            _fileProjectLookup = new ConcurrentDictionary <string, List <IVsSccProject2> >();
            foreach (var project in projects)
            {
                await AddProject(project);
            }
        }
Exemple #4
0
        internal async Task InitRepo()
        {
            await GitCommandWrappers.InitRepo(await GetSolutionFileName());

            SolutionExtensions.WriteMessageToOutputPane("Enabling SCC Provider");

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            var projects = await SolutionExtensions.GetLoadedControllableProjects();

            SolutionExtensions.WriteMessageToOutputPane("Adding Projects To git");
            foreach (var vsSccProject2 in projects)
            {
                await AddProjectToSourceControl(vsSccProject2);
            }
            await OpenTracker();
            await RefreshSolution();

            SolutionExtensions.WriteMessageToOutputPane("Done");
        }