This project is read-only.
1
Vote

Services exposed by EditorFeatures & implemented in VS.LanguageServices should be public

description

Any service which is only implemented in the VS bridge layer should be a public interface, to allow other hosts.

The worst offender is Microsoft.CodeAnalysis.Editor.Host.IWaitIndicator, which prevents me from creating a MEF container unless I include Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.VisualStudioWaitIndicator.

Here is a full list of internal interfaces that are only implemented in the VS layer
  • Microsoft.CodeAnalysis.Editor.ICommandHandler, Microsoft.CodeAnalysis.EditorFeatures
  • Microsoft.CodeAnalysis.Editor.IRefactorNotifyService, Microsoft.CodeAnalysis.EditorFeatures
  • Microsoft.CodeAnalysis.Editor.Host.IWaitIndicator, Microsoft.CodeAnalysis.EditorFeatures
  • Microsoft.CodeAnalysis.Editor.Host.INavigableItemsPresenter, Microsoft.CodeAnalysis.EditorFeatures
  • Microsoft.CodeAnalysis.Editor.Host.IReferencedSymbolsPresenter, Microsoft.CodeAnalysis.EditorFeatures
  • Microsoft.CodeAnalysis.Editor.Host.ICallHierarchyPresenter, Microsoft.CodeAnalysis.EditorFeatures
  • Microsoft.CodeAnalysis.Editor.ICommandHandler, Microsoft.CodeAnalysis.EditorFeatures
  • Microsoft.CodeAnalysis.Snippets.ISnippetInfoService, Microsoft.CodeAnalysis.Features
  • Microsoft.CodeAnalysis.SolutionCrawler.IPerLanguageIncrementalAnalyzerProvider, Microsoft.CodeAnalysis.Features
  • Microsoft.CodeAnalysis.Diagnostics.IDiagnosticUpdateSource, Microsoft.CodeAnalysis.Features
  • Microsoft.CodeAnalysis.SolutionCrawler.IIncrementalAnalyzerProvider, Microsoft.CodeAnalysis.Features
  • Microsoft.CodeAnalysis.SolutionCrawler.IPerLanguageIncrementalAnalyzerProvider, Microsoft.CodeAnalysis.Features
  • Microsoft.CodeAnalysis.Completion.Providers.ICompletionProvider, Microsoft.CodeAnalysis.Features
  • Microsoft.CodeAnalysis.Snippets.ISnippetInfoService, Microsoft.CodeAnalysis.Features
  • Microsoft.CodeAnalysis.Options.Providers.IOptionSerializer, Microsoft.CodeAnalysis.Workspaces

comments

SSL wrote Nov 2, 2014 at 4:46 PM

Can you also make IWorkCoordinatorRegistrationService public?
This service is necessary to make diagnostics work for a workspace.

Because it's internal, I needed to use horrible reflection.
https://github.com/SLaks/VSThemeBrowser/commit/3c6f7a7479862453643c384049e634897cddd836

SSL wrote Nov 2, 2014 at 8:06 PM

Can you also expose ICommandHandlerService?
(so I can forward commands without OLE)