Commit Graph

581 Commits

Author SHA1 Message Date
Logan Ramos
c2d0a69f87 Implements a starting tab reading API (#131998)
* Clean up proposed.d.ts

* More API Polish

* Allow resource to be undefined

* Fix hygiene

* Address feedback

* Remove unnecessary iteration

* Use index from map
2021-09-02 10:48:38 -04:00
Johannes Rieken
02aeb6acca Revert "replace severity with needsAttention, https://github.com/microsoft/vscode/issues/129037"
This reverts commit e93a59545c.
2021-09-02 09:00:44 +02:00
Johannes Rieken
e93a59545c replace severity with needsAttention, https://github.com/microsoft/vscode/issues/129037 2021-09-01 11:18:23 +02:00
Benjamin Pasero
c4546485f0 Enable FileSystemProvider to stat a file as readonly (fix #73122) 2021-09-01 10:40:26 +02:00
Johannes Rieken
db5aab03b6 debt - change the implementation of vscode.languages.getLanguages to not send an IPC message but to read from a sync'd state which gets pushed into the exthost 2021-08-31 16:46:29 +02:00
Johannes Rieken
e0c5f66bb5 Merge branch 'main' into joh/langStatus 2021-08-30 10:34:44 +02:00
Johannes Rieken
f9b95de0a9 further alignments between LanguageStatusItem and StatusBarItem, add pin command that makes language status become a status bar item 2021-08-27 17:02:15 +02:00
Johannes Rieken
f5ce7996ae fix https://github.com/microsoft/vscode/issues/128198 2021-08-27 11:47:22 +02:00
Johannes Rieken
4baebf9ea0 Merge branch 'main' into joh/langStatus 2021-08-25 14:24:44 +02:00
Logan Ramos
2da60a8a4a Finalize #129053 2021-08-23 15:08:33 -04:00
Johannes Rieken
1fd1444123 support language status command, no more pin for now 2021-08-20 13:04:41 +02:00
Johannes Rieken
bc4f06a084 Merge branch 'main' into joh/langStatus 2021-08-20 09:33:23 +02:00
Megan Rogge
d3db2d1062 Add terminal location API (#131028) 2021-08-19 19:08:06 -07:00
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