Skip to content

Go to Augmentation CodeLen opens a new editor in the current group instead of jumping to an existing editor in another group #5056

Closed

Description

@kevmoo

Describe the bug

  • macros Augmentation already open
  • Click 'go to augmented'
  • Opens new tab

Expected behavior

  • Open existing tab

Screenshots

vs.code.go.to.augmentation.mov
Workspace Environment
Dart Code extension: 3.87.20240402
Flutter extension: 3.86.0 (not activated)

App: Visual Studio Code
App Host: desktop
Version: mac 1.87.2

Workspace type: Dart (LSP)

Dart (3.5.0-18.0.dev): /Users/kevmoo/github/flutter/bin/cache/dart-sdk
Flutter (3.22.0-4.0.pre.48): /Users/kevmoo/github/flutter (No device)

Output from 'dart info'

/Users/kevmoo/github/flutter/bin/cache/dart-sdk/bin/dart info

If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.

General info

  • Dart 3.5.0-18.0.dev (dev) (Wed Apr 3 13:07:15 2024 -0700) on "macos_arm64"
  • on macos / Version 14.4.1 (Build 23E224)
  • locale is en

Project info

  • sdk constraint: '>=3.3.0-0 <4.0.0'
  • dependencies: macros
  • dev_dependencies: _fe_analyzer_shared, args, benchmark_harness, checks, dart_style

Process info

Memory CPU Elapsed time Command line
26 MB 0.0% 01-21:56:56 dart devtools --machine --dtd-uri=ws:/1xypD21g4Mbsag7T
27 MB 0.0% 18:25:05 dart devtools --machine --dtd-uri=ws:/sAPcA330m2F9MM24
302 MB 0.0% 18:25:08 dart language-server --client-id=IntelliJ-IDEA --client-version=IU-233.15026.9 --protocol=analyzer
302 MB 0.0% 09:57 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.87.20240402
82 MB 0.0% 01-04:10:11 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.87.20240402
70 MB 0.0% 01-03:50:23 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.87.20240402
71 MB 0.0% 01-03:49:56 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.87.20240402
70 MB 0.0% 01-03:49:25 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.87.20240402
70 MB 0.0% 01-03:49:02 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.87.20240402
77 MB 0.0% 01-03:48:30 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.87.20240402
26 MB 0.0% 01-21:56:57 dart tooling-daemon --machine
61 MB 0.0% 09:57 dart tooling-daemon --machine
28 MB 0.0% 18:25:05 dart tooling-daemon --machine
27 MB 0.0% 01-22:18:03 dart tooling-daemon --machine
81 MB 0.0% 23:24 flutter_tools.snapshot daemon

Activity

  1. DanTup commented on Apr 4, 2024

    @DanTup
    Member

    This probably happens here:

    const elementDocument = await vs.workspace.openTextDocument(codeLocation.uri);
    const elementEditor = await vs.window.showTextDocument(elementDocument);

    We could enumerate the open files instead and if we find it already open, focus it (similar to microsoft/vscode#178628).

  2. added this to the v3.88.0 milestone on Apr 4, 2024
  3. added
    in editorRelates to code editing or language features
    on Apr 4, 2024
  4. changed the title [-]Goto augmentation opens a new tab instead of just jumping to the already open tab[/-] [+]Go to Augmentation CodeLen opens a new editor in the current group instead of jumping to an existing editor in another group[/+] on Apr 4, 2024
  5. DanTup commented on Apr 4, 2024

    @DanTup
    Member

    @kevmoo btw, did you have 7 different VS Code windows open when you repro'd this? (you have 8 dart language_server processes, 7 of which are from VS Code... if you didn't have 7 open Windows, this seems like we might be leaking processes? 😬)

  6. kevmoo commented on Apr 4, 2024

    @kevmoo
    ContributorAuthor

    @DanTup – I DID restart things a few times to get macros logic working. Could be a leak! Only one VS code window open!

  7. DanTup commented on Apr 5, 2024

    @DanTup
    Member

    I DID restart things a few times to get macros logic working. Could be a leak! Only one VS code window open!

    If you can reproduce this, please file another issue with steps (and your exact SDK version), thanks!

  8. DanTup commented on Apr 8, 2024

    @DanTup
    Member
    goto.mp4
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