protected abstract void RegisterMiscellaneousFilesWorkspaceInformation(MiscellaneousFilesWorkspace miscellaneousFilesWorkspace);
Example #2
0
 public VisualStudioLspSolutionProvider(VisualStudioWorkspace visualStudioWorkspace, MiscellaneousFilesWorkspace miscellaneousFilesWorkspace)
 {
     _visualStudioWorkspace       = visualStudioWorkspace;
     _miscellaneousFilesWorkspace = miscellaneousFilesWorkspace;
 }
Example #3
0
 public MiscellaneousDiagnosticListTable(
     SVsServiceProvider serviceProvider, MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
     base(serviceProvider, workspace, diagnosticService, Identifier, provider)
 {
     ConnectWorkspaceEvents();
 }
Example #4
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await base.InitializeAsync(cancellationToken, progress).ConfigureAwait(true);

            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            var shell = (IVsShell) await GetServiceAsync(typeof(SVsShell)).ConfigureAwait(true);

            var solution = (IVsSolution) await GetServiceAsync(typeof(SVsSolution)).ConfigureAwait(true);

            cancellationToken.ThrowIfCancellationRequested();
            Assumes.Present(shell);
            Assumes.Present(solution);

            foreach (var editorFactory in CreateEditorFactories())
            {
                RegisterEditorFactory(editorFactory);
            }

            RegisterLanguageService(typeof(TLanguageService), async ct =>
            {
                await JoinableTaskFactory.SwitchToMainThreadAsync(ct);

                // Create the language service, tell it to set itself up, then store it in a field
                // so we can notify it that it's time to clean up.
                _languageService = CreateLanguageService();
                _languageService.Setup();
                return(_languageService.ComAggregate);
            });

            // Okay, this is also a bit strange.  We need to get our Interop dll into our process,
            // but we're in the GAC.  Ask the base Roslyn Package to load, and it will take care of
            // it for us.
            // * NOTE * workspace should never be created before loading roslyn package since roslyn package
            //          installs a service roslyn visual studio workspace requires
            shell.LoadPackage(Guids.RoslynPackageId, out var setupPackage);

            _miscellaneousFilesWorkspace = this.ComponentModel.GetService <MiscellaneousFilesWorkspace>();
            if (_miscellaneousFilesWorkspace != null)
            {
                // make sure solution crawler start once everything has been setup.
                _miscellaneousFilesWorkspace.StartSolutionCrawler();
            }

            RegisterMiscellaneousFilesWorkspaceInformation(_miscellaneousFilesWorkspace);

            this.Workspace = this.CreateWorkspace();
            if (await IsInIdeModeAsync(this.Workspace, cancellationToken).ConfigureAwait(true))
            {
                // make sure solution crawler start once everything has been setup.
                // this also should be started before any of workspace events start firing
                this.Workspace.StartSolutionCrawler();

                // start remote host
                EnableRemoteHostClientService();

                Workspace.AdviseSolutionEvents(solution);
            }

            LoadComponentsInUIContextOnceSolutionFullyLoadedAsync(cancellationToken).Forget();
        }
Example #5
0
 public MiscellaneousTodoListTable(MiscellaneousFilesWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
     base(workspace, todoListProvider, IdentifierString, provider)
 {
     ConnectWorkspaceEvents();
 }
Example #6
0
 protected override void RegisterMiscellaneousFilesWorkspaceInformation(MiscellaneousFilesWorkspace miscellaneousFilesWorkspace)
 {
 }
 public MiscellaneousDiagnosticListTable(MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
     this((Workspace)workspace, diagnosticService, provider)
 {
     ConnectWorkspaceEvents();
 }
Example #8
0
 public MiscellaneousTodoListTable(MiscellaneousFilesWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
     base(workspace, todoListProvider, Identifier, provider)
 {
     AddTableSource();
 }