1

I have created a new classes like following

[Order(Before = "High")] [Export(typeof(ICompletionSourceProvider))]
[ContentType("JavaScript"), Name("EnhancedJavaScriptCompletion")] 
internal sealed class JavaScriptCompletionSourceProvider 
   : ICompletionSourceProvider 
{ } 

And the CompletionSource

internal sealed class CompletionSource : ICompletionSource, IDisposable
{
    public void AugmentCompletionSession(ICompletionSession session, IList<CompletionSet> completionSets)
    {
    }
    public void Dispose()
    {
    }
}

These are both Added to a Visual Studio Package project. So when I try to debug (with F5) I can see the debugging symbols are loading and the debugging stops in the

protected override void Initialize()
{
    Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
    base.Initialize();
}

However when I'm editing a .js file, and invoking the intellisense (with that . dot that is) the deubbger won't break into ICompletionSourceProvider nor ICompletionSource methods of my classes.

So my question are:

  • 1-5 Questions about standard Javascript Intellisense addressed in this screencast http://screencast.com/t/TwDlnpfOV0bX
  • 6 how can we extend the standard javascript intellisense with extra options?
  • 7 Is it possible to have two ICompletionSourceProvider classes for the same ContentType?
Charles
  • 50,943
  • 13
  • 104
  • 142
DATEx2
  • 3,585
  • 1
  • 24
  • 26
  • 1
    If you have questions to ask, they belong in the question, not as an externally-hosted *picture* containing words. – Charles Mar 27 '13 at 17:11
  • Maybe that is generally true, but it's hard to describe them out of context. They only make sense on that particular piece of code (Reflector decomplied code out of a closed Microsoft library that is). – DATEx2 Mar 27 '13 at 21:11
  • Can you post the contents of your .vsixmanifest? – Jason Malinowski Mar 30 '13 at 04:01
  • There you go https://www.dropbox.com/sh/fvisze61pf8j9jv/nf01IRpkMO/JSIntellisense – DATEx2 Mar 30 '13 at 08:55
  • @JasonMalinowski please also have a look on this. http://stackoverflow.com/questions/15047178/visual-studio-javascript-intellisense-options-object There is no event for this and no way to provide intellisense for those :( It should really work like on c#' constructor initializers. Can you please advise on how can it be done? – DATEx2 Mar 30 '13 at 21:40

1 Answers1

6

The reason your extension isn't getting composed is you haven't added it as MEF component to in your .vsixmanifest. To add it,

  1. open the .vsixmanifest designer by double clicking the file in your solution explorer.
  2. click asserts
  3. click "new" on the right-hand-side
  4. choose "Microsoft.VisualStudio.MefComponent" as the type
  5. choose "project in current solution
  6. choose your extension project
Jason Malinowski
  • 18,148
  • 1
  • 38
  • 55
  • 1
    It worked thanks. However I still cannot change the glyphs. I have updated the vsix code at the same url as above https://www.dropbox.com/sh/fvisze61pf8j9jv/nf01IRpkMO/JSIntellisense Can you please answer my other questions as well? Or simply, how can I do some `reflection hack` to make use of the `public`/`private`/`internal` etc. glyphs due to the bug of VS2012 JSLS? – DATEx2 Apr 10 '13 at 14:20
  • 1
    I have no idea what you mean by glyphs, and of course without source code I can't offer any advise. But in general -- one question per Stack Overflow question, please. – Jason Malinowski Apr 10 '13 at 18:30
  • glyph = glyph icon (the image used by visual studio for every member) – DATEx2 Apr 13 '13 at 18:44