Skip to content

Missing code actions for refactoring key binds #1931

Closed

Description

@marko

The keybinding below worked well until recently. Now it displays a "No code actions available" message.

{
    "key": "cmd+. w",
    "command":  "editor.action.codeAction",
    "args": {
         "kind": "refactor.flutter.wrap.generic"
    },
    "when": "editorLangId == 'dart' && dart-code:anyFlutterProjectLoaded && editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
}

Activity

  1. DanTup commented on Aug 19, 2019

    @DanTup
    Member

    Do the code actions appear in the normal editor list (eg. with Cmd+.)? This sounds a bit like #1926 which I can't reproduce. Could you provide the info asked for here?

  2. added
    awaiting infoRequires more information from the customer to progress
    in editorRelates to code editing or language features
    on Aug 19, 2019
  3. marko commented on Aug 19, 2019

    @marko
    Author

    They appear and work in the normal list.

    Flutter 1.9.0
    VS Code 1.37.1
    Dart Code 3.3.0
    No errors in console

  4. DanTup commented on Aug 19, 2019

    @DanTup
    Member

    Ok, not the same. I can reproduce however. W're definitely returning matching code actions:

    Screenshot 2019-08-19 at 4 22 51 pm

    But they don't show up in the list... I'll do some digging.

  5. DanTup commented on Aug 19, 2019

    @DanTup
    Member

    This looks like a VS Code bug to me, so I've opened microsoft/vscode#79455 with a repro hoping for some input.

  6. removed
    awaiting infoRequires more information from the customer to progress
    on Aug 20, 2019
  7. added this to the v3.4.0 milestone on Aug 20, 2019
  8. DanTup commented on Aug 20, 2019

    @DanTup
    Member

    This turned out to be my bug... There's filtering in code actions (to avoid requesting unrelated code actions) but it didn't correctly handle when the filter was a sub-kind of Refactor (eg. when VS Code asked for refactors it worked, but when asked for refactor.foo it did not.

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

    in editorRelates to code editing or language featuresis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions