示例#1
0
 // This will be triggered when an HTML document is opened
 public void VsTextViewCreated(IVsTextView textViewAdapter)
 {
     // If the Glyphs haven't been loaded, load them
     if (GlyphfriendPackage.Glyphs == null)
     {
         GlyphfriendPackage.LoadGlyphs();
     }
 }
示例#2
0
 // This will be triggered when an HTML document is opened
 public void VsTextViewCreated(IVsTextView textViewAdapter)
 {
     // If the Glyphs haven't been loaded, load them
     if (!GlyphfriendPackage.AreGlyphsLoaded)
     {
         GlyphfriendPackage.AreGlyphsLoaded = true;
         System.Threading.Tasks.Task.Run(() =>
         {
             GlyphfriendPackage.LoadGlyphs();
         });
     }
 }
        // This will be triggered when a Markdown document is opened
        public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            // If the Emojis haven't been loaded, load them
            if (GlyphfriendPackage.Emojis == null)
            {
                GlyphfriendPackage.LoadEmojis();
            }

            // Set up the Completion handler for Markdown documents
            IWpfTextView      view   = AdaptersFactory.GetWpfTextView(textViewAdapter);
            CommandFilter     filter = new CommandFilter(view, CompletionBroker);
            IOleCommandTarget next;

            ErrorHandler.ThrowOnFailure(textViewAdapter.AddCommandFilter(filter, out next));
            filter.Next = next;
        }
        // This will be triggered when a Markdown document is opened
        public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            // If the Emojis haven't been loaded, load them
            if (!GlyphfriendPackage.AreEmojisLoaded)
            {
                GlyphfriendPackage.AreEmojisLoaded = true;
                System.Threading.Tasks.Task.Run(() =>
                {
                    GlyphfriendPackage.LoadEmojis();
                });
            }

            // Set up the Completion handler for Markdown documents
            IWpfTextView      view   = _adaptersFactory.GetWpfTextView(textViewAdapter);
            CommandFilter     filter = new CommandFilter(view, _completionBroker);
            IOleCommandTarget next;

            ErrorHandler.ThrowOnFailure(textViewAdapter.AddCommandFilter(filter, out next));
            filter.Next = next;
        }