Commit Graph

157 Commits

Author SHA1 Message Date
Matt Bierner
8cf88f7d8f Mark exthost/main arrays in events as readonly (#164187)
This better aligns the internal types of these event with the public apis
2022-10-20 15:07:11 -07:00
Johannes
62e2760ff5 Have the ability to add modelVersionId to IMarkerData and IMarker 2022-10-19 16:08:38 +02:00
Logan Ramos
256aaf296b Don't use @microsoft.com in source code (#163933) 2022-10-18 07:38:15 -07:00
Logan Ramos
6873816408 Test cleaning for telemetry API (#163885) 2022-10-18 13:12:56 +02:00
Matt Bierner
28fcaf139a Start cleaning up structure of code action code (#163875)
- Moves common types into `common`
- Move some command IDs into common
- Moves getCodeActions into `codeAction.ts` instead of `codeActionCommands`
2022-10-17 21:09:37 +02:00
Logan Ramos
28da8ed1aa Add some tests for extension telemetry (#163584)
* Add some tests for extension telemetry

* Fix failing tests

* More attempts at fixing failing tests

* Ok, I think I fixed the tests this time
2022-10-14 16:38:36 +02:00
Johannes Rieken
0dd2dc89d2 hook up unhandled extension errors with extension telemetry (#163424)
* hook up unhandled extension errors with extension telemetry

* fix layering

* forward unhandled language provider errors to extension telemetry loggers
2022-10-13 09:04:08 -04:00
Don Jayamanne
6527023564 Additional test for handling stream outputs in notebooks (#163502)
* Additional test for nb stream output handling

* test
2022-10-13 18:02:35 +11:00
Don Jayamanne
43957ccfe1 Compress streams in notebook outputs (#160946)
* Revert "Compress notebook output streams before rendering (#160667)"

This reverts commit 4230c22a08.

* Compress stream output items

* Minor perf improvements

* Misc

* Comments

* Added tests

* Merge issue

* More merge issues

* Misc

* Address code review comments
2022-10-11 14:43:46 -07:00
Connor Peet
3b21a16362 testing: fix breakage if item has same ID as test controller (#162620)
Fixes #160671
2022-10-04 08:41:37 -07:00
Johannes
e380b6143b use fakeTimers for extHostDiag-tests,
https://github.com/microsoft/vscode/issues/134972
2022-10-04 14:54:23 +02:00
Connor Peet
90e165a528 testing: remove redundant parent in InternalTestItem (#162621)
Initially, test IDs were just the strings given by the extension, but
a while ago we changed to the "extId", which is a concatenation of the
ID the extension provided, with all the parent IDs and the test
controller ID, so that we can uniquely identify any given test.

```
someController\0parent1\0parent2\0my test case
```

Because of this, we can derive the parent extId from any test's extId,
but we never got rid of this duplicate information. In this PR,
we do.
2022-10-03 21:21:05 -07:00
Connor Peet
b2f7100c3f testing: greatly improve decoration syncing (#161446)
* testing: greatly improve decoration syncing

- Mark a descoration as synced to a range on _any_ assignment to its
  range. https://github.com/microsoft/vscode/issues/161320
- Improve re-usage of testing decorations. Better performance and less
  unnecessary flickering.

* tweak
2022-09-21 23:00:45 -07:00
Johannes Rieken
77309b33d4 add WorkspaceEditMetadata and use it for applyEdit, (#160996)
* add `WorkspaceEditMetadata` and use it for `applyEdit`,

https://github.com/microsoft/vscode/issues/112109

* fix compilo in tests

* workspace edits from updating paths are marked as refactoring fyi @mjbvz
2022-09-16 09:44:19 +02:00
Matt Bierner
2514759850 Remove notebook content provider save and backup functionality (#160581)
For #147248

When stepping through the liveshare code, we figured out they do not appear to be using `save`, `saveAs`, or `backup` (they return empty results for these)

This PR removes this part of the proposal so we can track just the parts of the api that they are using
2022-09-12 14:08:25 -07:00
Johannes Rieken
e0ccceeb04 Use canonical uris when applying bulk edits (#159067)
* Use canonical uris when applying bulk edits

* move `reviveWorkspaceEditDto` into mainThreadBulkEdit
* make `reviveWorkspaceEditDto` require the uri ident service
* add test

fixes https://github.com/microsoft/vscode/issues/158845

* revive first, otherwise the `is` checks don't work

* fix tests
2022-09-06 14:51:11 +02:00
Connor Peet
c11dabf9ce testing: improve decoration syncing (#159705)
So, two problems. One, we didn't actually fully re-sync testing
decorations when explicitly updated by the extension, since we attempted
to get the test URI from the _diff_ which would never actually be
present on single updates (since the test item URI cannot be changed).
I think this was the main problem people saw.

So, this fixes that. It also applies a change so that we only sync the
ranges to what the extension gives us if the document version is up to
date with what was in the extension host. This should avoid syncing
decorations to the wrong place--instead just use VS Code's own decoration
location tracking until we get a newer update from the extension.

Fixes #158475
Fixes #153304
2022-08-31 12:57:49 -07:00
Semesse
60d39ea1ab fix exthost language features test 2022-08-23 00:17:03 +08:00
Joyce Er
fa4ff1519d Implement and adopt edit session identifier API proposal (#157733)
* Add canonical workspace identifier proposed API

* Use canonical id to store and resume edit sessions

* Add git extension workspace identity provider

* Fix warning incorrectly showing up

* Make auto resume behavior opt in

* * Create a separate service
* Accept WorkspaceFolder instead of URI
* Return string instead of object

* Make edit session restores resilient to provider registration races

* Introduce an activation event
* Activate contributing extension before using provider

* `CanonicalWorkspaceIdentity` -> `EditSessionIdentity`

* Show progress while resuming edit session

* Store edit session even if extension will take care of opening target workspace

* Address most of PR feedback

* `IEditSessionsWorkbenchService` -> `IEditSessionsStorageService`

* Unregister provider in renderer

* Split out proposal into new `editSessionIdentityProvider.d.ts`

* Fix bad merge

* Always show progress in window

* Convert URI schemes
2022-08-19 08:01:43 -07:00
Benjamin Pasero
dced70bbf3 Create editor groups from ViewColumn as needed (refs #123270) (#157640)
* make `createTextEditor` async and create editor groups (refs #123270)

* API docs update
2022-08-10 06:51:07 +02:00
Johannes Rieken
8bada27fdd Merge pull request #155148 from microsoft/joh/double-barnacle
joh/double barnacle
2022-07-18 16:45:00 +02:00
Benjamin Pasero
aeb4a695fc tests - speed up unit tests (#149712) (#155147)
* tests - convert history tracker to in-memory (#149712)

* fix warnings from missing service

* sqlite slowness

* disable flush on write in tests unless disk tests

* more runWithFakedTimers

* disable flush also in pfs

* fix compile
2022-07-15 12:12:56 +00:00
Alex Ross
e06f679dbf MainThreadHostTreeView: [createInstance] First service dependency of CustomTreeView at position 4 conflicts with 2 static arguments (#155160)
Fixes #155155
2022-07-14 09:03:35 +00:00
Johannes
40df705e1b add API proposal for vscode.TabInputTextMerge 2022-07-14 09:33:13 +02:00
Johannes Rieken
f413297170 joh/plastic fowl (#154275)
* * derive workspace dto with util
* be strict when defining reference version ids (must be set to a value or undefined)

* relax `ResourceNotebookCellEdit`
2022-07-06 18:33:04 +02:00
Johannes Rieken
1aaff9ef3d stub activationEventIsDone function, (#154276)
fixes https://github.com/microsoft/vscode/issues/154268
2022-07-06 11:10:43 -04:00
Matt Bierner
2c7201670f Remove use of forEach (#154196)
For #154195
2022-07-05 12:51:28 -07:00
Johannes Rieken
7fb4287727 calling executeCommand for a locally known extension cmd should fire activation event (#153683)
We should always fire the event but when the command is already known (locally) we don't await that.

fixes https://github.com/microsoft/vscode/issues/150293
2022-06-29 16:37:23 +02:00
David Dossett
f148d86fd2 Add "Do Not Disturb" Mode (#149645)
* Add mute icon to notification center toolbar

* Add placeholder mute method

* Add config service support

* Refactor mute toggle behavior

* More refactoring

* Add hack for switching actions on toggle

* Use do-not-disturb icons

* Update status bar icon

* Add comment for hack todo

* Add experimental tag

* Update setting name references

* Fix typo

* Update status bar icon and filter all errors

* Update icons

* Updates icon and toggle behavior

* Update codicons ttf

* cleanups

* Use UI state instead of setting

* Show window progress instead of notification

* Update Storage scopes

* Update Storage scopes

* Refactor to use NotificationService

* Minor fixes

* Update tests

* Address PR feedback

* Update tests

* 💄

* 💄

* zen - use dnd mode for filtering

* set filters right on startup

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2022-06-27 06:49:10 -07:00
Justin Chen
7cb79a6027 Merge pull request #152383 from justschen/justin/CodeAction-Telemetry
Adding additional telemetry on CodeActions (trigger reasons)
2022-06-23 11:06:21 -07:00
Johannes Rieken
3d6ab7cfe6 passing test for https://github.com/microsoft/vscode/issues/152882 (#152998) 2022-06-23 10:24:31 -07:00
Sandeep Somavarapu
a1e1e307e3 introduce application config model (#152889)
* introduce application config model
- application configuration is active and used only in non default profiles
- read/write application scoped settings only from application layer and not from user layer
- extensions get application scoped values as global values
- settings editor does not show application scoped settings in non default profle
- added unit tests

* fix tests
2022-06-22 11:57:39 -07:00
Justin Chen
081bcdca40 fixed tests in extHostLanguageFeatures 2022-06-17 12:47:59 -07:00
Alexandru Dima
2e91c26f1d Avoid old import syntax (#152471) 2022-06-17 14:15:55 +00:00
Matt Bierner
001d52cf6b Add Symbol.iterator functions for vscode.d.ts collection types (#151806)
* Add entries functions for vscode.d.ts collection types

Fixes #151802

* Spelling

* Enable lib.iterable in vscode.d.ts

* Switch to use `Symbol.iterator` instead of `entries`

* Use extends Iterable in more places

* Fixing testItemCollection types

* Fixing exthost testing
2022-06-15 16:29:50 +00:00
Matt Bierner
354e1a0595 Finalize data file reading API (#152127)
Fixes #147481
Also reverts #150963 since the `kind` field is not being finalized
2022-06-15 07:56:02 -07:00
Johannes Rieken
3d471d2ca9 Merge pull request #151841 from microsoft/joh/cute-bobcat 2022-06-15 08:46:12 +02:00
Alexandru Dima
d8823e67a9 Revert "fix https://github.com/microsoft/vscode/issues/150293 (#151616)" (#152026)
This reverts commit 670c3fd002.
2022-06-14 12:16:18 +02:00
Johannes
0376810398 add API proposal for TextEdit#newText: SnippetString 2022-06-13 11:33:42 +02:00
Johannes
ed9ed45794 Merge branch 'main' into joh/voluminous-lobster 2022-06-10 09:07:30 +02:00
Matt Bierner
f7e12a3a92 Use optional method calls in more places (#151634)
This replaces code like:

```ts
if (foo.bar) {
    foo.bar(cat);
}
```

with:

```ts
foo.bar?.(cat)
```

Which is more concise but has the same meaning
2022-06-09 15:04:28 -07:00
Johannes Rieken
670c3fd002 fix https://github.com/microsoft/vscode/issues/150293 (#151616) 2022-06-09 14:55:46 +00:00
Johannes
43c31079ee manual fixing of prefer-const violations 2022-06-09 10:19:56 +02:00
Johannes
0656d21d11 auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
Tomer Chachamu
c6350b3800 Ensure access token comes from correct provider (#150473) 2022-05-27 22:52:12 +00:00
Matt Bierner
d891b49fc0 Enable file DataTransfer on tree views (#150328)
For #147481
2022-05-24 21:38:12 -07:00
Joao Moreno
ffb7b00100 Merge commit 'ae2202631366eea0aaed6f881f87c2b44ae1b647' into sandy081/policy 2022-05-18 20:12:22 +02:00
Johannes
30f5b296ab make getWordAtText-config configurable and use lower budget for speedy tests 2022-05-17 16:53:50 +02:00
Alexandru Dima
6ec996a9b7 Adopt runWithFakedTimers to speed up tests (#149712) (#149720) 2022-05-17 16:21:45 +02:00
Sandeep Somavarapu
5eb8bee367 Merge branch 'main' into sandy081/policy 2022-05-13 08:39:05 +02:00