Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no completion list for .NET static methods #163

Closed
rkeithhill opened this issue Feb 18, 2016 · 19 comments
Closed

There is no completion list for .NET static methods #163

rkeithhill opened this issue Feb 18, 2016 · 19 comments
Labels
Issue-Bug A bug to squash.
Milestone

Comments

@rkeithhill
Copy link
Collaborator

To repro try:

[DateTime]::<ctrl+space>
@daviwil
Copy link
Contributor

daviwil commented Feb 18, 2016

Hah, yep, @dfinke and I were talking about this recently. He's been looking into fixing it in VS Code. From his last report, it sounds like VS Code is not asking for IntelliSense after the colon for whatever reason and then when you manually invoke it, the results aren't being displayed. May need to file a bug on the VS Code team if we can't work around it.

@daviwil daviwil added this to the 0.5.0 milestone Feb 18, 2016
@daviwil daviwil added the Issue-Bug A bug to squash. label Feb 18, 2016
@rkeithhill
Copy link
Collaborator Author

So for instance members we get this request:

    READ MESSAGE:

    {
      "jsonrpc": "2.0",
      "id": 8,
      "method": "textDocument/completion",
      "params": {
        "uri": "file:///c%3A/Users/Keith/.vscode/extensions/ms-vscode.PowerShell-0.4.1/examples/DebugTest.ps1",
        "position": {
          "line": 1,
          "character": 3
        }
      }
    }

and give a response like this (elided)

    {
      "jsonrpc": "2.0",
      "id": "8",
      "result": [
        {
          "label": "Date",
          "kind": 1,
          "detail": null,
          "documentation": "datetime Date { get; }",
          "sortText": null,
          "filterText": null,
          "insertText": "Date",
          "textEdit": {
            "range": {
              "start": {
                "line": 1,
                "character": 3
              },
              "end": {
                "line": 1,
                "character": 3
              }
            },
            "newText": "Date"
          },
          "data": null
        },
        ...

For static .NET members, I'm seeing a completion request from VSCode upon typing the second ::

    {
      "jsonrpc": "2.0",
      "id": 12,
      "method": "textDocument/completion",
      "params": {
        "uri": "file:///c%3A/Users/Keith/.vscode/extensions/ms-vscode.PowerShell-0.4.1/examples/DebugTest.ps1",
        "position": {
          "line": 2,
          "character": 12
        }
      }
    }

and we respond with (also elided):

    {
      "jsonrpc": "2.0",
      "id": "12",
      "result": [
        {
          "label": "MaxValue",
          "kind": 1,
          "detail": null,
          "documentation": "static datetime MaxValue {get;}",
          "sortText": null,
          "filterText": null,
          "insertText": "MaxValue",
          "textEdit": {
            "range": {
              "start": {
                "line": 2,
                "character": 12
              },
              "end": {
                "line": 2,
                "character": 12
              }
            },
            "newText": "MaxValue"
          },
          "data": null
        },
        {
          "label": "MinValue",
          "kind": 1,
          "detail": null,
          "documentation": "static datetime MinValue {get;}",
          "sortText": null,
          "filterText": null,
          "insertText": "MinValue",
          "textEdit": {
            "range": {
              "start": {
                "line": 2,
                "character": 12
              },
              "end": {
                "line": 2,
                "character": 12
              }
            },
            "newText": "MinValue"
          },
          "data": null
        },
        ...

It seems like the PowerShell extension is performing correctly.

@dfinke
Copy link
Contributor

dfinke commented Feb 18, 2016

Yes, looks like vs code is not displaying a drop down with the suggestions.

@rkeithhill
Copy link
Collaborator Author

So who's going to submit this to the VSCode team? We have a simple repro. :-)

@dfinke
Copy link
Contributor

dfinke commented Feb 18, 2016

It's best if comes from an insider ;-)

Sent from Outlook Mobile

On Thu, Feb 18, 2016 at 9:20 AM -0800, "Keith Hill" notifications@github.com wrote:

So who's going to submit this to the VSCode team? We have a simple repro. :-)


Reply to this email directly or view it on GitHub:
#163 (comment)

@daviwil
Copy link
Contributor

daviwil commented Feb 18, 2016

Seems like I've been elected ;) I'll file an issue when I get in to the office

@rkeithhill
Copy link
Collaborator Author

While you're at it, submit another issue on debug data tips. I've observed that scope plays some part here. Global scope variables act flakey at first. They maybe show once but not thereafter as long as we're executing in global scope. As soon as I step into a function, the global variables pop debug data tips quite reliably. Unfortunately, I then get no data tips for the variables inside the function I'm executing in. And when there is not a data tip, it is because we never received a variables request from VSCode. Every time we receive a variables request (not related to populating the variables view), a debug data tip appears. I think we should be able to give the VSCode team a simple repro.

@rkeithhill
Copy link
Collaborator Author

I'm putting this on the backlog for now as I'm pretty sure this isn't an extension bug. The corresponding issue in VSCode doesn't have a milestone associated with it yet.

@daviwil
Copy link
Contributor

daviwil commented Feb 29, 2016

Sounds good!

@pcgeek86
Copy link

Just ran into this problem myself. 😦

@daviwil
Copy link
Contributor

daviwil commented May 3, 2016

Hmm, I believe this will be fixed when VS Code 1.1.0 and PSES 0.6.0 is out, right @rkeithhill?

@daviwil daviwil modified the milestones: 0.6.0, Backlog May 3, 2016
@rkeithhill
Copy link
Collaborator Author

Well it works correctly with an alpha build of 1.1.0 from 4/28 against PSES 0.5.0. Curiously, it doesn't work with the latest insiders build against PSES 0.5.0. You get a completion list but the contents are not the static members. So I guess it depends on which best represents what we will get with the 1.1.0 release of VSCode.

@daviwil
Copy link
Contributor

daviwil commented May 3, 2016

I'm guesing the current 1.1.0-insiders is what will end up getting shipped next week. Alpha is probably the dev branch for 1.2.0. Weird that it isn't working though, they fixed the bug for that version...

@rkeithhill
Copy link
Collaborator Author

Maybe it also required a change on the extension side? I was running against 0.5.0 and not 0.6.0.

@daviwil
Copy link
Contributor

daviwil commented May 4, 2016

Ahhh, right, we actually had a fix on our site that comes in 0.6.0.

@daviwil
Copy link
Contributor

daviwil commented May 11, 2016

This works for me in VS Code 1.1.0! 🎊 I'm going to close this now.

@daviwil daviwil closed this as completed May 11, 2016
@pcgeek86
Copy link

I also confirmed in 1.1.0-insider. David's not just fibbing! 😉 😜

image

@daviwil
Copy link
Contributor

daviwil commented May 11, 2016

And that's with the 0.5.0 extension installed? Interesting, didn't think it'd work there too. Good to know!

@pcgeek86
Copy link

Freshly installed on a new install of Windows 10 Insider Build 14332! Yes, 0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

4 participants