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

Notepad++ User Defined Language in Visual Studio

$
0
0


I'd like to use my userdefinedlanguage.xml files from Notepad++ in Visual Studio. How do I export classifiers at runtime?

Here is the flow:

  1. Visual Studio starts
  2. UDLPackage starts
  3. UDLPackage loads my *.xml files
  4. UDLPackage creates a UDLClassifierProvider for each *.xml file
  5. UDLPackage exports the UDLClassifierProvider with the Name, ContentType, FileExtension specified in each xml file.
    [Export(typeof(ITaggerProvider))]
    [ContentType("ook!")]
    [TagType(typeof(ClassificationTag))]
    internal sealed class OokClassifierProvider : ITaggerProvider
    {

        [Export]
        [Name("ook!")]
        [BaseDefinition("code")]
        internal static ContentTypeDefinition OokContentType = null;

        [Export]
        [FileExtension(".ook")]
        [ContentType("ook!")]
        internal static FileExtensionToContentTypeDefinition OokFileType = null;

I can do steps 1 through 4. How do I do step 5? How do I programatically export my UDLClassifierProvider with MEF at runtime.


Aron Curzon




Viewing all articles
Browse latest Browse all 4410

Trending Articles



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