Commit Graph

303 Commits

Author SHA1 Message Date
Matt Bierner
9dae408dc3 Switch webview api back to use delegate model
For #77131

Going back the the delegate based model for a few reasons:

- It gives us a better approach to add additional API hooks in the future (such as for rename)

- In practive, the capabilities were almost always the same as the `userData` on the document. It is rather confusing to have both `userData` and the capabilities 'on' the document
2020-03-12 16:54:48 -07:00
Matt Bierner
3ef02fe7b0 Use the UndoRedoService for CustomEditors (#92408)
* Use the UndoRedoService for CustomEditors

For #90110

Changes custom editors (the ones not based on text) to use the UndoRedoService. This involved:

- Moving edit lifecycle back into the main process again (this is actually the bulk of the changes)
- Removing the `undo`/`redo` methods on  `CustomEditorModel`
- Using the undoRedoService to trigger undo/redo
2020-03-12 11:34:40 -07:00
Matt Bierner
44d4fe895d Allow using Command in StatusBarItem (#92046)
Fixes #22353

StatusBarItem is one of the few places in our API where we only allow extensions to give us a command as a `string` instead of as `Command` object. This change updates the API to also allow passing in a `vscode.Command` (which also allows arguments!)
2020-03-09 12:57:33 -07:00
Matt Bierner
077cd38d26 Add cancellation on CustomEditor.save
For #91702
2020-03-04 15:49:10 -08:00
Alex Ross
426d5bfb94 Fix problems with changing local port and restoring
Fixes #92008
2020-03-04 16:45:23 +01:00
Alex Dima
c2a604a18c Add DocumentSemanticTokensProvider.onDidChangeSemanticTokens 2020-03-02 13:45:25 +01:00
Eric Amodio
afacd2bdfe Fixes #89509, #91464, #91628, #91619 2020-03-01 11:29:54 -05:00
Matt Bierner
8ef18acdaf Don't require return value backup
Fixes #91703

All custom editors should implement backup or throw an exception if they cannot for some reason.
2020-02-27 11:55:39 -08:00
Eric Amodio
d46c8a8c3c Lots of timeline related changes, below
UI:
Adds Refresh icon to view title
Adds "Load more" entry at the end of the list for paging

API:
Restructures api around cursors
Renames TimelineCursor to generic TimelineOptions for more flexibility
Adds paging object to Timeline for clearer paging usage
Changes cursors to be strings, and explicit before and after cursors
Allows limit to take a cursor, so we can reload current data set
Clarifies id and fallback to timestamp
Adds reset flag to TimelineChangeEvent for providers to reset caching

Git provider:
Orders and returns commit date as the timestamp
Supports limit of a cursor (using rev-list --count)
Stops returning working/index changes when paging
Forcably resets cached data when changes are detected (naive for now)
2020-02-24 15:48:37 -05:00
Matt Bierner
99d5733e5f New iteration of webview editor API proposal
For #77131

**Motivation**
While our existing webview editor API proposal more or less works, building an editable webview editor is fairly tricky using it! This is especially true for simple text based editors.

It'd also be nice if we could get bi-directional live editing for text files. For example, if I open the same file in a webview editor and in VS Code's normal editor, edits on either side should be reflected in the other. While this can sort of be implemented using the existing API, it has some big limitations

**Overview of changes**
To address these problems, we've decided have two types of webview editors:

- Text based webview editors. These editors used a `TextDocument` as their data model, which considerably simplifies implementing an editable webview. In almost all cases, this should be what you use for text files

- Complex webview editors. This is basically the existing proposed API. This gives extension hooks into all the VS Code events, such as `save`, `undo`, and so on. These should be used for binary files or in very complex text editor cases.

Both editor types now have an explicit model layer based on documents. Text editor use `TextDocument` for this, while custom editors use `WebviewEditorCustomDocument`. This replaces the delegate based approach previously used.
2020-02-21 16:26:01 -08:00
Johannes Rieken
8b95561098 show names of formatting edits and code actions providers when they block save. also add links that links that open the settings editor for each feature, #90851 2020-02-21 15:35:30 +01:00
Johannes Rieken
798a4026ef debt - have Dto and UriDto 2020-02-21 10:09:20 +01:00
Johannes Rieken
88ce9daa5d extract Serialized<T> util 2020-02-21 09:43:28 +01:00
Gustavo Cassel
4957d8d6df Exposed Open/Save dialog title on public VSCode Proposed API (#90493)
Co-authored-by: Alex Ross <alros@microsoft.com>
2020-02-19 15:38:44 +01:00
Johannes Rieken
3e211597ff also support single icon, not just ThemeIcon and {light, dark}-tuples, #77728 2020-02-19 10:14:04 +01:00
Alex Dima
7169e432d8 Fixes #42649 2020-02-17 22:19:03 +01:00
Eric Amodio
9ae0fd36c9 Enhances timeline - commands, timestamp, etc
Adds contributable commands to timeline items
Adds right-aligned timestamp to timeline items
Adds Open Changes to Git timeline items
Adds Copy Commit ID to Git timeline items
Adds Copy Commit Message to Git timeline items
2020-02-14 15:22:45 -05:00
Eric Amodio
69b30f6ba7 Adds paging support (wip) 2020-02-14 15:22:45 -05:00
Andre Weinand
e588a9cd1a Introduce evaluatable expression API; fixes #89084 2020-02-14 12:53:56 +01:00
Matt Bierner
fb622a8b83 Move code action documentation contribution point to come from metadata
For #86788
2020-02-11 11:36:23 -08:00
Daniel Imms
c6caa9a451 Merge branch 'master' into tyriar/75793 2020-02-08 13:50:01 -08:00
Rachel Macfarlane
cf96b11223 Auth providers - show dialog on token access, closes #89754 2020-02-06 15:30:53 -08:00
Eric Amodio
4cc5b776dc Overhauls timeline display to stream in results
Implements many API review changes
Fixes #89558
2020-02-05 18:16:37 -05:00
Daniel Imms
5fad95f544 Change getDefaultShellAndArgs to use promises
Part of #75793
2020-02-05 12:03:45 -08:00
Daniel Imms
1aefcce704 Change requestAvailableShells to use promises
Part of #75793
2020-02-05 11:55:14 -08:00
Joao Moreno
788cfa0767 use UriComponents for SCMRawResource
fixes microsoft/vscode-remote-release#2115
2020-02-04 10:58:40 +01:00
Rachel Macfarlane
c52bfa8906 Rename Session to AuthenticationSession 2020-02-03 16:04:29 -08:00
Eric Amodio
44edf3c197 Polishes the timeline UI/UX
Cleans up API and removes some unused features (e.g. paging)
Adds date formatting
Adds loading progress and message
Removes lots of console.logs 😁
Adds titles to diffs
2020-01-27 15:28:33 -05:00
Eric Amodio
d7b5fe4cc7 Adds refresh for when timeline changes 2020-01-27 15:28:33 -05:00
Eric Amodio
87c2332fed Adds timeline diff on click and icon support 2020-01-27 15:28:33 -05:00
Eric Amodio
70e1e9b4f4 Adds timeline view & api providers (wip) — #84297 2020-01-27 15:28:33 -05:00
Christof Marti
ad063b9df9 ThemeIcon support (fixes #72489) 2020-01-24 21:40:21 +01:00
Rachel Macfarlane
8c2a25968f Account extension - support multiple sessions, passing scopes to login 2020-01-24 12:05:23 -08:00
Matt Bierner
f3dbcea32a Adds a backup method (#88948)
Adds a backup method to the custom editor API proposal. This method allows custom editors to hook in to VS Code's hot exit behavior

If `backup` is not implemented, VS Code will assume that the custom editor cannot be hot exited.

When `backup` is implemented, VS Code will invoke the method after every edit (this is debounced). At this point, this extension should back up the current resource.  The result is a promise indicating if the backup was successful or not

VS Code will only hot exit if all backups were successful.
2020-01-23 16:14:27 -08:00
Johannes Rieken
5d85d2eeef suggest - don't send default ranges for each item 2020-01-23 15:29:50 +01:00
Rachel Macfarlane
7d55753182 Use authentication provider display name in settings sync notification 2020-01-22 15:43:25 -08:00
Rachel Macfarlane
c1eacb4e56 Expose authentication providers array 2020-01-22 11:37:20 -08:00
Pine Wu
c1a0defa5f Merge remote-tracking branch 'origin/master' into pine/alwaysShowInlineDetails 2020-01-21 09:13:22 +01:00
Alex Ross
017aef63b9 Add tunnel list changed event API 2020-01-20 14:41:10 +01:00
Alex Ross
40aa781ab8 Add API to get an array of tunnel descriptions 2020-01-20 12:30:11 +01:00
Johannes Rieken
0d3b5da08b bulk - refactor much to be prepared for WorkspaceEditMetadata 2020-01-20 12:18:04 +01:00
Alex Ross
71570aa4e8 Add candidate port filtering to proposed API 2020-01-20 11:38:45 +01:00
Matt Bierner
ff9fd2fa1a Custom Editors: pass original edit objects back to extensions
For #88719

With this change, instead of passing custom editor edit json back and forth with the extension host, we keep the original edit objects on the extension host. This means that we can pass extensions back the exact same edit object they first hand to us. It also means that edits no longer need to be json serializable.
2020-01-19 20:14:25 -08:00
Matt Bierner
5335a721fa Add backup capability for custom editors 2020-01-19 20:14:25 -08:00
Pine Wu
591a43e8de label2 2020-01-17 17:13:45 +01:00
Pine Wu
86218b280c Merge remote-tracking branch 'origin/master' into pine/alwaysShowInlineDetails 2020-01-17 15:43:53 +01:00
Alex Dima
9e1d730cf2 SemanticTokens - implement feedback received in API call:
- extract a separate DocumentRangeSemanticTokensProvider that deals with a document range
- extract a separate provideDocumentSemanticTokensEdits that deals with updating via SemanticTokensEdits a previous result
2020-01-16 18:02:02 +01:00
Johannes Rieken
a8f2db516b slightly more compact dto, no need to send false 2020-01-16 13:02:26 +01:00
Rachel Macfarlane
b80e813365 Updates to authentication provider API 2020-01-15 15:45:29 -08:00
Rachel Macfarlane
60beab2535 Move settings sync auth into built in extension 2020-01-14 14:50:37 -08:00