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

Need direction for starting with my custom editor package/extension.

$
0
0

Hi guys. I'm a bit lost and I can't figure out a good approach. Basically, I want to make an editor extension for Visual Studio 2013 that edits a particular/new file extension. The contents of the file will actually be plain old C#, but what I want the editor to do is add an additional assembly to the IntelliSense context. Forgive me if my terminology is wrong; please correct me.

Here's a scenario:

Suppose we open MyFile.myext in Visual Studio. The editor should basically just inherit all the capabilities of Visual Studio's built-in C# editor, except now if you type "My.Namespace.In.The.Additional.Assembly", IntelliSense kicks in and offers code completion, just as if you referenced the assembly in the project and were typing within a ".cs" file. That's pretty much it.

This may sound kind of pointless, initially. The first question I will invariably get is "why not just reference the assembly in the project?" Basically, I made a code pre-processor that depends on classes and attributes in the assembly I'd like to add to the IntelliSense context. This code would never actually get compiled; the output from the pre-processor is what gets compiled.

I have tried creating a custom editor package and setting the language service ID to that of CSharp's, but it didn't work. Even just a plain editor generated by the Visual Studio SDK project template had really weird issues while moving the mouse around the editor; it would rapidly toggle between the cursor mouse icon and the pointer icon.

Where should I begin? Can anyone just point me in the right direction, or even show me some examples? Thanks in advance! :)


Viewing all articles
Browse latest Browse all 4410

Trending Articles



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