How to completely replace an existing language service with a new one

I developed the Visual Studio Language Service to replace one of the existing third-party developers. This existing language service, followed by Project System (developed in native VC ++). And it forces each action of the open file to use its own language service.

Scenarios:

  • The file opens through the solution explorer.
  • The file is opened using the Go to Definition command.
  • The file is opened using the Add New Item dialog box.

In all of these scenarios, the third party sets its own language service GUID for IVsTextBuffer. It looks like they are using some kind of post-processing method of the OpenFile method.

I need to completely replace my Language Service with mine. How could I do this? Or how can I get a notification about an open editor file (or Show Editor Window)?

PS

In my script, I implemented a custom EditorFactory that creates an instance of CoreEditor and installs my LanguageService, but then it is replaced by a third party.

Any help is appreciated.

PS I opened this question on MSDN . I tried the IVsTextViewCreationListener program, but this does not help me. If you could help, please take a look at MSDN .

+4
source share

All Articles