Commit Graph

518 Commits

Author SHA1 Message Date
Johannes Rieken
4222c512c2 add fly-out UI for language status items, tweak API proposal 2021-08-17 16:58:36 +02:00
Alex Ross
84a8a567e8 Move TaskGroup isDefault api out of proposed
Part of #79188
2021-08-16 15:07:07 +02:00
Daniel Imms
5bab627e05 Start of change state event, clean up ext host events
Part of #127717
2021-08-12 14:48:51 -07:00
Connor Peet
fa8ccff4d8 testing: initial output correlation 2021-08-11 13:08:58 -07:00
Megan Rogge
72190f7c69 Finalize terminal color API (#130123)
* fix #128228

* Update src/vs/vscode.d.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/vscode.d.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* redo commit

* remove from proposed api

* improve description

Co-authored-by: Megan Rogge <meganrogge@Megans-MBP.lan>
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
2021-08-10 08:59:29 -07:00
Connor Peet
9125758184 testing: add support for test tags
For #129456
2021-08-09 16:31:23 -07:00
Logan Ramos
d18e54f820 Implements #129053 (#130103) 2021-08-05 09:58:03 -04:00
Tyler Leonhardt
c935e2292f rename forceRecreate to forceNewSession and allow it to take in a detail 2021-08-03 16:21:04 -07:00
Alex Ross
3d5b13265d Re-add task default API with fixes (#129397)
Part of #79188
2021-07-26 15:30:46 +02:00
Joyce Er
a1423e3998 Return NotebookEditor from interactive.open command (#129084)
* Return NotebookEditor from `interactive.open` command

This allows extensions to obtain a reference to the embedded
NotebookEditor at creation. Otherwise extensions must look
through window.visibleNotebookEditors to obtain a reference
to the NotebookEditor and call revealRange for scrolling,
and window.visibleNotebookEditors may change in future.

Co-authored-by: rebornix <penn.lv@gmail.com>

* process argument label

Co-authored-by: rebornix <penn.lv@gmail.com>
2021-07-24 10:44:49 -07:00
Connor Peet
06d0b354e0 testing: remove proposed check 2021-07-22 16:59:43 -07:00
Johannes Rieken
e30d70f9f5 turn language status API proposal into push model, https://github.com/microsoft/vscode/issues/129037 2021-07-21 12:51:14 +02:00
Johannes Rieken
4508c29d35 first cut for language status API proposal, https://github.com/microsoft/vscode/issues/129037 2021-07-21 10:22:36 +02:00
Tyler Leonhardt
37687f06b6 add proposed forceRecreate option on getSession. Related to #129064 2021-07-20 16:09:36 -07:00
Connor Peet
cfc48e81aa testing: update api from feedback 2021-07-20 15:02:21 -07:00
Connor Peet
4482677442 notebooks: update renderer messaging api to feedback 2021-07-20 09:53:04 -07:00
Connor Peet
7422b951b4 notebooks: stablize createRendererMessaging
Closes #123601
2021-07-19 15:18:29 -07:00
Connor Peet
42c268a626 testing: clean up nits
- rename TestController.createRunConfiguration to .createRunProfile, and associated types
- rename TestItemCollection.remove to TestItemCollection.delete
2021-07-16 12:46:59 -07:00
Megan Rogge
ad5970666d Support setting color in TerminalOptions/ExtensionTerminalOptions (#128856) 2021-07-16 11:23:36 -07:00
Alex Ross
cbde02b886 Failing test: Revert "Add isDefault to TaskGroup API (#128596)"
This reverts commit 48975dc080.
2021-07-16 10:16:16 +02:00
headerjson
48975dc080 Add isDefault to TaskGroup API (#128596)
* first pass at adding api

(cherry picked from commit 8a583c52ee)

* add task2 remaining changes

* remove unnecessary changes

* modify tasks.json directly for test

* reset tasks in test

* Fix compilation errors

Co-authored-by: Alex Ross <alros@microsoft.com>
2021-07-15 15:42:12 +02:00
Johannes Rieken
1ba9d7be42 Merge pull request #128667 from Eskibear/type-hierarchy-provider
add type hierarchy provider
2021-07-15 12:29:29 +02:00
Yan Zhang
bf580fb457 check proposed api enabled status
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
2021-07-15 17:01:32 +08:00
Yan Zhang
8135848f77 add type hierarchy provider
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
2021-07-15 11:48:28 +08:00
Connor Peet
581ff12c39 testing: improve test children API
This changeset results from the discussion in and fixes #126987.
Migration for these changes should take about 15-20 minutes.

- `createTestItem` no longer takes a parent. Instead, it creates a free-
  floating test item, which can be added as a child of a parent.
- The `TestItem.children` is now a `TestItemCollection`, a set-like
  interface that also allows replacing items (intelligently diffing
	them internally) wholesale. This removes the need for the "generation
	counter" used in samples previously.
- There is no longer a `root` on the test controller, but instead an
  `items` property which is the same `TestItemCollection`
- The `tests` in the `TestRunRequest` has been replaced with an `include`
  property. If undefined, the extension should run all tests. (Since
	there is no longer a root to reference).

Here's some example migrations:

- 3fad3d66c1
- 3aff746316
2021-07-14 18:12:59 -07:00
Connor Peet
fa9255c0de almost complete update for run configurations 2021-07-12 17:28:01 -07:00
Connor Peet
9a09d4817d testing: add test configurations api 2021-07-12 09:45:21 -07:00
Tyler Leonhardt
ba01bbac9c Remove deprecated auth API proposals. Fixes #127144 2021-07-08 10:38:23 -07:00
Henning Dieterichs
556f74ae55 Merge pull request #124996 from microsoft/hediet/isUndoRedo
Forwards the isUndoing/isRedoing flags to the extension host.
2021-07-07 17:57:24 +02:00
Sandeep Somavarapu
b38186b046 Fix #126953 2021-07-06 11:57:34 +02:00
rebornix
92e91e9e47 re #115679. hide proxy from exthost comments. 2021-07-05 15:44:48 -07:00
rebornix
b17fa9dcf5 add notebook to the text document of the input box in iw. 2021-06-25 15:18:04 -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
João Moreno
8d7db6955d remove proposal check
closes #124263
2021-06-25 11:49:37 +02: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
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
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
Megan Rogge
0c7223c475 finalize terminal iconPath (#125783) 2021-06-15 05:31:23 -07:00
Daniel Imms
50652b93db Merge pull request #126053 from microsoft/tyriar/126040
Convert TerminalLink to class, add TerminalProfile validation
2021-06-15 03:50:23 -07:00
Connor Peet
ec65867a75 testing: improve cancellation, and allow test runs to be individually cancelled
Fixes #125712
2021-06-14 16:46:03 -07:00
Daniel Imms
eb6825e071 Convert TerminalLink to class, add TerminalProfile validation
Fixes #126040
2021-06-11 07:28:24 -07:00
Daniel Imms
465759bc58 Prevent other extensions registering terminal profiles 2021-06-11 06:45:36 -07:00
Daniel Imms
0a9a394a63 Use a class for TerminalProfile 2021-06-11 05:01:40 -07:00
Johannes Rieken
a31c6c3550 extract ExtHostNotebookDocumentsShape into its own thing 2021-06-07 17:41:12 +02:00
Johannes Rieken
10442e00b4 extract ExtHostNotebookEditorShape into its own thing 2021-06-07 16:25:03 +02:00
rebornix
b098b10a77 Merge branch 'notebook/dev' into main 2021-06-04 10:32:13 -07:00
Johannes Rieken
f207b38307 inline NotebookExecuteHandler type 2021-06-04 11:32:25 +02:00
João Moreno
f99e1c358f fixes issue with asExternalUri API 2021-06-04 10:38:59 +02:00
Johannes Rieken
073c4ffd7d remove deprecated notebook-namespace, notebooks is the future 2021-06-02 15:54:31 +02:00