Commit Graph

6832 Commits

Author SHA1 Message Date
Daniel Imms
855d764df5 Implement contributed profiles in terminal editors
Fixes #127158
2021-06-25 13:19:20 -07:00
Connor Peet
45eea1f87b testing: initial api side of test coverage
For https://github.com/microsoft/vscode/issues/123713
2021-06-25 12:58:04 -07:00
Alex Ross
48d81c8754 Better maintain original tunnel source 2021-06-25 14:43:24 +02:00
Alex Ross
20099087a0 Simplify port forward parameters 2021-06-25 14:43:23 +02:00
Johannes Rieken
b57065709d adopt allSettled in AsyncEmitter and move back into event.ts, https://github.com/microsoft/vscode/issues/121144 2021-06-25 14:24:12 +02:00
João Moreno
8d7db6955d remove proposal check
closes #124263
2021-06-25 11:49:37 +02:00
Megan Rogge
fc9962bc88 move find out of terminal service and get find to work in terminal editors (#127100) 2021-06-24 22:10:26 +00:00
Connor Peet
6a76c62232 testing: remove data from TestItems
Data was viral and spread generics all over the place. It was also
hard to type correctly and consistently, which ended up in the type
being `any` unless great care was taken.

This removes the `data`. Instead, consumers can use a `WeakMap<TestItem, T>`
to keep data associated with the test item. This is a similar pattern
to what is used to store data about documents and debug sessions, for
example. Here's an example of a migration:

8fdf822985 (diff-2fe3ad6ad19447c57c5db14c5a6ccb5544944494db6b909540d70ea499784b49R9)
2021-06-24 12:02:49 -07:00
Connor Peet
dd771de867 testing: update extHostTypeConverters 2021-06-23 12:53:08 -07:00
Connor Peet
df5cd47784 testing: update test item async resolving
See https://github.com/microsoft/vscode/issues/126987#issuecomment-867031454
This commit makes the following changes:

- Keep the `resolveChildrenHandler`, and remove the CancellationToken parameter
- Remove `TestITem.status` and instead have `TestItem.canResolveChildren?: boolean`
- Add `TestItem.busy?: boolean`. Note that the UI would implicitly show
  the item as busy while `resolve` is being called. (This is a new feature)

Upgrading to account for these changes should take around 10 to 20 minutes:

1. Where you previously set `item.status = vscode.TestItemStatus.Pending`,
   instead set `item.canResolveChildren = true`.
2. If you used the cancellation token in resolveChildrenHandler, you no
   longer need to do so. What you do here instead is up to you:

	 - If you set up global workspace watchers, add those to `context.subscriptions`
	 - You _probably_ don't need to set up watchers for "file" test items,
	   since you will receive updates via `vscode.workspace.onDidChangeTextDocument`
		 and/or any FileWatcher you have set up.

Example of an update: 7287c64bf7
2021-06-23 12:50:06 -07:00
Connor Peet
fc0ee4e4bc testing: pass test item in context menu actions
Fixes #126646
2021-06-22 18:47:25 -07:00
Connor Peet
751f8729dc protocol: refactor to use enum for marshalled object ids 2021-06-22 18:47:25 -07:00
Connor Peet
fe84fcfa65 testing: correctly no-op when running a test outside inclusions
Fixes #126756
2021-06-22 18:47:25 -07:00
Sandeep Somavarapu
b35bc5e021 improve extension kind computation for web
- include web kind if extension supports web
- support multiple extension kinds for contribution point
2021-06-22 18:43:08 +02:00
Johannes Rieken
24f9000e97 merge CompletionItemLabel into CompletionItem#label, https://github.com/microsoft/vscode/issues/39441 2021-06-22 14:35:31 +02:00
Johannes Rieken
a2c4a0ca8c use label, detail, and description for CompletionItemLabel, tweak rendering, https://github.com/microsoft/vscode/issues/39441 2021-06-22 13:59:42 +02:00
Connor Peet
186e565ec0 refactor: update to new testing API
Previously in the testing API, you called `registerTestProvider` with
your own instance of a TestController, and VS Code would request
workspace or document tests. This has been changed: now, you call
`createTestController`, which returns an object, and call
`createTestItem` to insert test nodes under the `controller.root`.

Extensions should generally decide themselves when to publish tests. For
example, when a file is opened in an editor, test extensions will want
to make sure tests for that file are available so that inline
decorations can be shown. This is pretty similar to what the editor
API does in diagnostics.

There is still a `resolveChildrenHandler` on the controller (rather than
the TestItem directly), which you should _set_ if the test extension
supports lazy discovery. Additionally, if you support running tests,
you'll also want a `runHandler` (migrating from the old `runTests` method).

Some of the existing test providers have been updated, you can check
them out here:

- https://github.com/microsoft/vscode-extension-samples/tree/main/test-provider-sample
- https://github.com/microsoft/vscode-selfhost-test-provider

In summary, to update to the new API:

- Call `vscode.test.createTestController` instead of `registerTestController`
- Move the contents of your `runTests` method to `controller.runHandler`
- Move your `TestItem.resolveHandler` to `controller.resolveChildrenHandler`,
  which may involve adding some `instanceof` checks.
- If you lazily discovered tests in `createDocumentTestRoot`, you'll want
  to trigger that logic based on `vscode.workspace.onDidOpenTextDocument`.
- If your test runner can deal with showing locations of unsaved changes,
  listen for `vscode.workspace.onDidChangeTextDocument` to trigger those
  changes in the tree.
2021-06-21 12:14:24 -07:00
Alex Dima
4f222a8730 Fixes #126808: Convert file: URIs to vscode-file: also in the web worker extension host when executing on the desktop. 2021-06-21 17:05:18 +02:00
Benjamin Pasero
994a6c197b file watcher - have a interface for raw events (maybe #126813) 2021-06-21 16:52:11 +02:00
Benjamin Pasero
a102b4478e file watcher - provide an event for raw changes access 2021-06-21 07:38:43 +02:00
Daniel Imms
fabd4da160 Merge pull request #126674 from microsoft/tyriar/126243_group_service
Create terminal group service
2021-06-18 14:40:35 -07:00
Daniel Imms
f97906dfb1 Disallow setting active instance to undefined outside services 2021-06-18 13:38:15 -07:00
Logan Ramos
db5a22630b Revert exclusive only for openTextDocument 2021-06-18 13:38:19 -04:00
Daniel Imms
7fbfe75eb2 Merge remote-tracking branch 'origin/main' into tyriar/126243_group_service 2021-06-18 10:07:51 -07:00
Logan Ramos
9d20e9ff56 Fix #123270 2021-06-18 11:16:28 -04:00
Daniel Imms
74243095bf Make set active instance a setter 2021-06-18 08:09:08 -07:00
Daniel Imms
1c55ecdcc9 Introduce term instance host interface 2021-06-18 06:58:00 -07:00
Alex Ross
7dea6d7402 Fix build 2021-06-18 15:09:38 +02:00
Alex Ross
8d1b3b59f6 Fix location of onDidChangeTreeData in proposal
Part of #32592
2021-06-18 12:04:35 +02:00
Barbara Valdez
6615b4ea98 Modify treeDataChange event (#125214) 2021-06-18 10:15:34 +02:00
rebornix
e0e5d6fc6c Merge branch 'notebook/dev' into main 2021-06-17 13:11:46 -07:00
Peng Lyu
1ce078638d Merge pull request #126616 from microsoft/interactive/editor
Interactive editor
2021-06-17 13:11:01 -07:00
rebornix
9510b91e7e minimal changes. 2021-06-17 11:38:56 -07:00
rebornix
a44b23c2f1 register interactive toolbars 2021-06-17 10:35:07 -07:00
Alex Ross
a414bf2973 Add protocol to tunnel API
Part of #124816
2021-06-17 16:13:54 +02:00
Johannes Rieken
c24879b45a Revert "When having details for non modal, show more which shows modal... https://github.com/microsoft/vscode/issues/125750"
This reverts commit fbe6292824.
2021-06-17 11:20:12 +02:00
Johannes Rieken
4b537c8a0f Revert "keep promise alive when continuing in modal dialog, https://github.com/microsoft/vscode/issues/125750"
This reverts commit 99a2f34ed9.
2021-06-17 11:19:45 +02:00
rebornix
4e9f41be6d swap out menu ids for interactive window 2021-06-16 22:20:34 -07:00
Johannes Rieken
99a2f34ed9 keep promise alive when continuing in modal dialog, https://github.com/microsoft/vscode/issues/125750 2021-06-16 15:16:54 +02:00
Johannes Rieken
fbe6292824 When having details for non modal, show more which shows modal... https://github.com/microsoft/vscode/issues/125750 2021-06-16 15:09:30 +02:00
Johannes Rieken
16facd8645 relax supportThemeIcons 2021-06-16 14:53:43 +02:00
Johannes Rieken
b5da2d0f10 extract MarkdownString from MarkedString type, fyi @mjvbz 2021-06-16 14:53:42 +02:00
Connor Peet
3e0c442a8e testing: avoid duplicated calls to workspace root if document tests are not provided
Fixes #126290
2021-06-15 18:29:02 -07:00
Daniel Imms
d21b9b8e6d Merge pull request #126407 from microsoft/merogge/terminal-editor
Terminal editors
2021-06-15 17:34:09 -07:00
Matt Bierner
cd08aa0081 Initial work adding NotebookCellData.mime
For #126280
For #126417
2021-06-15 15:16:58 -07:00
meganrogge
377131da05 migrate createTerminal to use CreateTerminalOptions everywhere 2021-06-15 13:26:00 -07:00
Martin Aeschlimann
6c4230e86c MarkdownString for StatusBarItem.tooltip. For #126258 2021-06-15 15:35:01 +02:00
Megan Rogge
3873cae1da finalize terminal iconPath (#125783) 2021-06-15 15:06:26 +02:00
Alex Ross
7a4e3cd309 Fix timing issue where port detection can fail to start 2021-06-15 15:06:26 +02:00
Daniel Imms
084fb5e7bf Add better checks for start index and length 2021-06-15 15:06:24 +02:00