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

How to open several tabs in bulk or without activating every opened tab - OpenDocumentOptions(bool:activate) doesn't seem to work #404

Open
luislhg opened this issue Jul 27, 2024 · 0 comments
Labels
outofprocSDK Issues about new out-of-process SDK
Milestone

Comments

@luislhg
Copy link

luislhg commented Jul 27, 2024

Hello, I'm developing an extension that should keep track of tabs (save, open and restore) based on the current branch or feature the user is working with.

The code below does open every tab as expected, but it is tremendously slow.

  1. Because it opens each one in sequence
    (I'd expect some way to specify and open multiple files at once, just like when you open a .sln or .csproj, VS will open all tabs really quickly)

  2. The activate: false doesn't seem to take effect, each tab is activated/rendered before opening the next one.

// TODO: Find some way to open documents faster, without activating/viewing one by one.
// Open documents.
var documents = Extensibility.Documents();
var openDocumentOptions = new OpenDocumentOptions(activate: false);
foreach (var document in savedDocuments)
{
    await documents.OpenDocumentAsync(new Uri(document.FilePath), openDocumentOptions, cancellationToken);
}
@tinaschrepfer tinaschrepfer added the outofprocSDK Issues about new out-of-process SDK label Aug 6, 2024
@tinaschrepfer tinaschrepfer added this to the Backlog milestone Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
outofprocSDK Issues about new out-of-process SDK
Projects
None yet
Development

No branches or pull requests

2 participants