Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How to totally replace existing Language Service with new one

$
0
0

I developed a Visual Studio Language Service (for VS 2005/2008/2010) to replace one of existing third party's. That existing language service accompanied with Project System (developed in native VC++). And it forces every file open action to use it's own language service.

Scenarios are:

  1. File opens through Solution Explorer.
  2. File opens through Go To Definition command.
  3. File opens through Add New Item dialog.

In all this scenarios third party sets their own Language Service GUID to IVsTextBuffer. It's seems that they use some kind of OpenFile method post processing techniques.

I need to totally replace their Language Service with my one. How I could do this? Or how I could get notified of Editor Open file (or Show Editor Window)?

P.S.

In my scenario I implemented custom EditorFactory that instantiate CoreEditor and sets my LanguageService, but then (when window is actually shown in VS) it replaced by third party one.

P.P.S.

The actual scenario that I want to implement is the following. I create a Property Page where is one selector is my service active or not. If it is active, I need to replace existing language service to open some files (they extensions is explicitly setted by user), if my service is not active I don't do anything.

I also figured out that languge service that I want to replace using MPF Editor extensions technique (in VS 2010), and loaded automatically by VS. How can I stop VS from doing this, or how to I can totally unload it?

______________

Any help is appreciated.



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>