Commit Graph

40 Commits

Author SHA1 Message Date
Benjamin Pasero
75aa22e7d9 editors - fix cyclic dependency 2021-07-07 13:22:38 +02:00
Benjamin Pasero
b2f203113c editors - more alignments across editor inputs 2021-05-29 10:36:49 +02:00
Benjamin Pasero
903e219ccb files - need to track individual readonly stats everywhere (#124524) 2021-05-28 10:42:30 +02:00
Matt Bierner
79762396a0 Respect soft revert for custom editors (#115658)
Fixes #115591
2021-05-24 12:26:45 -07:00
Logan Ramos
721cdd6472 Fix data loss when renaming custom editors (#124057)
* Start structuring the custom editor rename work

* Restore renamed / moved editors from backup

* Add back missing readonly

* Discard backup after using it

* Address feedback

* Remove console log

* Switch to using a map

* Delete used backups from the map
2021-05-19 01:16:00 +00:00
Logan Ramos
eefa92fbfb Fix #123297 2021-05-07 11:35:56 -04:00
Benjamin Pasero
7d5b672eb7 working copy - introduce generic resource working copy that can track orphaned state 2021-05-07 10:06:42 +02:00
Logan Ramos
376161b915 Fix 122637 2021-05-04 13:15:43 -04:00
Benjamin Pasero
b0d5ab6aab 💄 2021-04-19 07:00:35 +02:00
Benjamin Pasero
085df87b3b working copy - extract a workingCopy.ts file 2021-04-17 09:07:22 +02:00
Benjamin Pasero
e1727abb41 backups - rename to be working copy related 2021-04-17 08:59:28 +02:00
Benjamin Pasero
6360146a41 backups - introduce backup identifiers and adopt 2021-04-17 07:50:33 +02:00
Benjamin Pasero
520462074d working copies - first cut typeId support 2021-04-15 14:22:36 +02:00
Matt Bierner
e1f0f8f513 Add override keyword in codebase (#120755)
For #120675

This uses a script to add the override keyword to places that need it in the codebase

Note that we can't enable the --noImplicitOverride setting yet since there are still around 200 errors that require further attention
2021-04-08 10:05:20 -07:00
Matt Bierner
3499f63dc1 Exploration: Better transferring of TypedArrays used in Webview.postMessage (#115664)
* Improve passing of ArrayBuffers to and from webviews

Fixes #115807

* Serialize and restore typed arrays too

This also makes it so that if you pass the same ArrayBuffer twice in an object, we use a single object on the receiver side too

* Fix spelling

* Require VS Code 1.56+
2021-03-30 06:49:34 +00:00
Logan Ramos
c72d7612b4 Add an untitled document data property (#115790)
* Add an untitled document data property

* Dispose of the model passed back

* Fix layer problem

* Add untitledDocumentData to untitled notebooks

* Fix compilation errors

* Switch to using VS Buffer

* Fix threading the untitled document data back through

* Prevent save dialog on untitled reopen with

* Change ignore save setting

* Change setting name and abide by preserve focus

* Add unit test

* Switch to js doc comments

* Consolidate calculating the untitled value, and added test
2021-03-10 19:54:18 +00:00
Matt Bierner
ea5f05a435 Trying to clairify how webview options are used and passed around
- Move protocol types into protocol
- Hold off on combining the options objects until serialization
- Add explicit converstions instead of using `...`
- Make a few methods take property bags to help avoid passing arguments in wrong order
2021-03-05 18:49:17 -08:00
Matt Bierner
5d5b9dd0a8 Don't label non-editable custom editors as readonly
We should only use the readonly label when an editable custom editor is on a readonly resource
2021-03-03 10:57:24 -08:00
Matt Bierner
f3f4eebecb Label custom editor as deleted if the backing file is deleted
Fixes #99270

This should make it so a custom editor tab is tagged `(deleted)` if the backing file is deleted
2021-02-26 21:07:47 -08:00
Matt Bierner
ee64fdae8b Use dispose directly instead of loop 2020-12-09 18:32:38 -08:00
Benjamin Pasero
630e706ad2 Add open context to certain commands (#110475)
* editor commands - move API commands to workbench core

* rename EditorViewColumn => EditorGroupColumn

* mixin context to open commands

* address some feedback

* add comment
2020-11-12 17:01:13 +01:00
Matt Bierner
2b820b4bff Hook custom editor backup cancellation into the extension layer 2020-11-10 15:09:15 -08:00
Benjamin Pasero
41e73c836f backup - wire cancellation into backup() method 2020-10-17 09:25:26 +02:00
Benjamin Pasero
50ee84f780 debt - btoa/atob is not core 2020-10-15 13:55:18 +02:00
Matt Bierner
8397461b70 Only mark custom editor as non-dirty once save has completed successfully
Fixes #101872
2020-10-14 16:54:12 -07:00
Matt Bierner
4be7f6a297 Correctly mark WorkingCopyCapabilities.Untitled for custom editors
Fixes  #108143
2020-10-14 16:22:11 -07:00
Matt Bierner
cafa01e041 Use multi-byte aware version of btoa
Fixes #108431
2020-10-13 17:05:53 -07:00
Benjamin Pasero
3b99352509 debt - inline remoteAuthority into workbench environment service 2020-10-07 15:57:28 +02:00
Matt Bierner
af5dd228ed Make sure we create a unique working copy resource for each custom editor resource
Fixes #106547

This switching the working copy resource for custom editors to use an encoded path instead of the resource's original path. This fixes a few problems:

- Fixes a bug where two resources with the same path (but different schemes or authorities) would be considered the same

- Fixes a bug where windows style paths (`c:\path`) would cause issues. This is the root cause of #106547

- Fixes a bug where the viewType was used as the raw authority. If the view type contains invalid characters, this would have caused issues
2020-09-16 19:49:14 -07:00
Matt Bierner
51dc3193d3 Move webview editor into own module
This splits the core `webview` element services from the `webview` editor services.
2020-09-14 16:08:29 -07:00
Benjamin Pasero
6e022766d1 debt - adopt defaultUriScheme over hardcoded vscode-remote in toLocalResource 2020-09-10 18:03:51 +02:00
Matt Bierner
80b1a775d6 Enable webview commands for webview views
Fixes #105670

Previously our webview commands assumed that webviews were always going to be in an editor. This is no longer true with webview views.

To fix this, I've added an `activeWebview` to the `IWebviewService`. This  tracks the currently focused webview.
2020-09-09 14:44:46 -07:00
Matt Bierner
08be66406f Make context the first arugment to constructors 2020-08-27 13:51:11 -07:00
Matt Bierner
9b117bbb1d Move custom editor activation into mainThreadCustomEditors 2020-08-27 13:51:11 -07:00
Matt Bierner
72cbf699d8 Split out main thread webview panels into own class/file 2020-08-26 16:46:26 -07:00
Matt Bierner
4d88b39b7d Split up main thread webview services 2020-08-26 16:46:25 -07:00
mtaran-google
40164f1f5b Add to WorkingCopyCapabilities enum to reflect usage. (#105020)
* Add to WorkingCopyCapabilities enum to reflect usage.

The capabilities field was being used with a value of 0 in a few places that implemented the IWorkingCopy interface. This inconsistency wasn't picked up by the compiler because the value in the enum was specified as `1 << 1` and not as `2`. This changes the value to be specified as `2` (for better type checking) and makes the 0 to use the new enum value.

* some polish on top

Co-authored-by: Maksym Taran <maksym.taran@gmail.com>
Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>
2020-08-24 08:14:40 +02:00
Matt Bierner
041cf5dd0f Split main thread webview views to own file 2020-08-21 16:42:31 -07:00
Matt Bierner
5ec7e96238 Spelling 2020-08-21 16:42:31 -07:00
Matt Bierner
d192ba8806 Extract main thread custom editors to own file 2020-08-21 12:22:08 -07:00