Skip to content

SparkSense suggested completions only to first level #5

Description

@mysterd429

I installed SparkSense
(from http://www.google.com/url?sa=D&q=http://visualstudiogallery.msdn.microsoft.com/ef944259-fc8a-42e0-838e-f397957e1d11&usg=AFQjCNHHnbLnNGiY0_1Ya2OX5QfMcw1ogA),
and I get suggested completions when I type "${", but then I can't get
suggestions past the first identifier I type.

As in, if I type "${Ht", I get a suggestion for Html, but if I type "$
{Html.", I get nothing. Pressing control-space from there just gets
me the HTML tags (a, div, p). Code completion for "${Html.NameFor(m
=> m." would be very useful, as it would be for "${ViewData.Model.".

Activity

  1. mysterd429 commented on May 9, 2013

    @mysterd429
    Author

    I started looking at the code. Is there a guideline to the structure or what particular methods do? I haven't worked with OLE or the VS SDK before. It seems that the VSIX code is entered through SparkSense.StatementComplection.KeyPressInterceptor.Exec. Is that a good place to start investigating?

    Right now, when I run project, it launches the experimental instance of Visual Studio, and it stops at breakpoints that I set, but when I turn off all of the breakpoints, I don't get any code completion at all.

  2. RobertTheGrey commented on May 9, 2013

    @RobertTheGrey
    Member

    Best place to start I would say is CompletionSource.cs specifically the AugmentCompletionSession method. There you will be able to generate completion sets for the context of where the trigger point is.

    Make sense?

  3. mysterd429 commented on May 10, 2013

    @mysterd429
    Author

    Is there documentation about how SparkSense is structured? The learning curve for the SDK seems pretty steep, and I thought I might back my way into it by learning SparkSense first.

    I see how AugmentCompletionSet can be used to add to completionSet, but I'm not sure how to get that code to execute. I've opened a .spark file in the experimental instance, but only the Exec method I mentioned earlier gets executed.

  4. RobertTheGrey commented on May 10, 2013

    @RobertTheGrey
    Member

    I structure SparkSense based on the very thin guidance and examples that were available at the time a few years ago, so it might be that can change to something else if there is a better way, but there's no documentation other than to say that's what I found on MSDN and a few other projects out there at the time.

    The Exec is the first place to get hit since it captures the keystroke, and then it attempts to figure out the trigger point I think. Once it's done that, I believe the second part comes in to build up the completion list and it should hit break points there. If it's not hitting yours then I'm not sure what's up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions