Commit Graph

307 Commits

Author SHA1 Message Date
Benjamin Pasero
a825aaaa90 support auto save on focus lost for all editors (#84672) 2019-11-21 07:14:26 +01:00
Benjamin Pasero
16466cb05d context - rename saveable => readonly 2019-11-19 15:44:38 +01:00
Benjamin Pasero
4a42a6436e editor - add and adopt revert() 2019-11-19 07:40:22 +01:00
Benjamin Pasero
8efa538d7d editors - tweak readonly usage 2019-11-18 17:08:55 +01:00
Benjamin Pasero
7c526f2b80 files - respect editor.isReadonly() better 2019-11-18 12:41:39 +01:00
Benjamin Pasero
a08ccb351e files - put explicit save reason 2019-11-18 10:59:15 +01:00
Benjamin Pasero
db36cc2af3 editors - fix issue with replacing untitled 2019-11-18 08:30:39 +01:00
Benjamin Pasero
9727eb6050 untitled - fix save with associated file path 2019-11-18 07:57:48 +01:00
Benjamin Pasero
00688bf051 working copies - properly implement save, saveAs, saveAll (#84672) 2019-11-17 17:44:57 +01:00
Benjamin Pasero
72c2f506de working copy - introduce first save/revert semantics (#84672) 2019-11-15 15:36:55 +01:00
Benjamin Pasero
0b33f025db editors - more explicit editor view model for diff editors 2019-11-15 11:05:39 +01:00
Matt Bierner
87387677d3 Fix strict function types for registerEditorInputFactory
#81574
2019-11-14 17:37:24 -08:00
Benjamin Pasero
a73d87acae editor - getName() is required 2019-11-14 08:54:29 +01:00
Benjamin Pasero
929fab1876 dialog - extract confirmSave to file dialog servie 2019-11-14 08:37:18 +01:00
Benjamin Pasero
87064db103 debt - untitled editor => untitled text editor 2019-11-06 12:44:59 +01:00
Dhairya Nadapara
0abf6cf816 added split pane options to settings (#82888)
* added split pane options to settings

* moved option to workbench config

* updating description messages

* review changes

* 💄
2019-10-21 17:58:15 +02:00
Benjamin Pasero
935b0f1c0d debt - optional chaining 2019-10-21 15:44:21 +02:00
SteVen Batten
c805ab792e centralize part visibility eventing
add context key for editor area visible
fixes #67707
2019-10-18 15:38:48 -07:00
Benjamin Pasero
671fc8f654 editor - conditionally show editor open errors in a modal dialog 2019-10-18 10:27:10 +02:00
Benjamin Pasero
66eea492f8 debt - introduce and use assertDefined for strict init (#78168) 2019-10-07 10:56:34 +02:00
Matt Bierner
7e70b1dda0 Mark that preferredEncoding can be undefined / not initialized
Part of #78168
2019-10-04 14:58:42 -07:00
Matt Bierner
36b66c90e9 Add firstOrDefault helper
Array accesses are not strict null checked. Added a type checked helper for when you just want to get the first element of an array of fallback to a default if the array is empty
2019-09-18 18:20:26 -07:00
SteVen Batten
1b9a873753 add cansavecontextkey (#80337)
* add cansavecontextkey

* use save logic for save active editor ctx key

* use context key plus explorer focus

* remove unused imports

* feedback
2019-09-11 10:03:50 -07:00
Matt Bierner
011836a150 Prototyping custom editors (#77789)
* Custom Editor exploration

For #77131

Adds a prototype of custom editors contributed by extensions. This change does the following:

- Introduces a new contribution point for the declarative parts of a custom editor
- Adds API for registering a webview editor provider. This lets VS Code decided when to create a webview editor
- Adds an `openWith` command that lets you select which editor to use to open a resource from the file explorer
- Adds a setting that lets you say that you always want to use a custom editor for a given file extension
- Hooks up auto opening of a custom editor when opening a file from quick open or explorer
- Adds a new extension that contributes a custom image preview for png and jpg files

Still needs a lot of UX work and testing. We are also going to explore a more generic "open handler" based approach for supporting custom editors

Revert

* Re-use existing custom editor if one is already open

* Don't re-create custom editor webview when clicking on already visible custom editor

* Move customEditorInput to own file

* First draft of serializing custom editor inputs

* Use glob patterns instead of simple file extensions for matching custom resoruces for custom editors

* Add descriptions

* Try opening standard editor while prompting for custom editor

* Make sure we hide image status on dispose

* Make sure we restore editor group too

* Use glob patterns for workbench.editor.custom

* Allow users to configure custom editors for additional file types

* Use filename glob instead of glob on full resource path

* Adding placeholder for prompt open with

* Add enableByDefault setting for editor contributions

* Enable custom editors by default and add `discretion` enum

Changes `enableByDefault` boolean to a `discretion` enum. This should give more flexibility if we want other options (such as forcing a given custom editor to always be used even if there are other default ones)

* Allow custom editors to specify both a scheme and filenamePattern they are active for

* Rework custom editor setting

* Don't allow custom editors to be enabled for all resources by a config mistake

* Replace built-in image editor with one from extension

* Adding reopen with command

* Improve comment

* Remove commented code

* Localize package.json and remove image

* Remove extra lib setting from tsconfig
2019-09-10 17:56:57 -07:00
Benjamin Pasero
ced1335a0e debt - less null 2019-09-02 11:08:37 +02:00
Benjamin Pasero
a4be32a8c2 debt - proper strict null typing in subclasses of editor 2019-09-02 10:56:35 +02:00
Benjamin Pasero
58583a7b84 fix #79633 2019-08-29 08:29:23 +02:00
Benjamin Pasero
fc9e37d835 start activeEditorGroupIndex from 1 instead of 0 (for #22755) 2019-08-28 09:28:13 +02:00
Benjamin Pasero
0f659c90eb editors - merge activation options into one 2019-08-26 18:43:19 +02:00
Benjamin Pasero
b7996ed7c5 editors - tweak options around group activation more 2019-08-26 17:50:04 +02:00
Benjamin Pasero
2e26a4f252 options - better overwrite() 2019-08-26 16:40:02 +02:00
Benjamin Pasero
2a7f5b4224 💄 2019-08-26 16:08:03 +02:00
Benjamin Pasero
daaf263d00 better fix for #79798 2019-08-26 13:14:42 +02:00
Benjamin Pasero
406b1f385a more editor group context keys (fix #22755) 2019-08-09 07:49:19 +02:00
Benjamin Pasero
222401c661 fix #77996 2019-08-05 14:35:39 +02:00
Matt Bierner
7411e3f341 Convert many simple getters for events into readonly properties
We seem to use the readonly property way of exposing these values more widely. Standardizing this a bit across the codebase
2019-07-15 16:12:25 -07:00
Matt Bierner
8b451a25ef getDescription(), return undefined instead of null 2019-07-15 15:15:20 -07:00
Matt Bierner
2b07856867 getPreferredEditorId return undefined instead of null 2019-07-15 15:03:54 -07:00
Matt Bierner
711eca07d1 Remove extra checks that are not needed 2019-07-15 15:03:54 -07:00
Benjamin Pasero
3976e538f5 remove swipeToNavigate (#57629) 2019-07-09 08:02:47 +02:00
Benjamin Pasero
6c61f43084 history - allow to navigate with mouse buttons 3/4 2019-07-04 10:49:44 +02:00
Benjamin Pasero
4ca89463d4 use Map over object {} (#74948) 2019-06-07 07:49:26 +02:00
SteVen Batten
d540b242ea Merge pull request #62337 from sbatten/14986
adopt toggled in view and appearance menu
2019-06-04 09:48:41 -07:00
Benjamin Pasero
d8f4d9b66b 'Keep Open' menu entry should show disabled when editor is pinned (fixes #46807) (#74384) 2019-05-27 09:22:26 +02:00
SteVen Batten
0bc1d7243b move fullscreen context key to be more appropriate 2019-05-21 16:43:55 -07:00
SteVen Batten
1a7eba77d9 merge conflicts 2019-05-21 00:59:43 +00:00
Matt Bierner
6685f2d2bd Convert toResource to return undefined instead of null 2019-05-16 10:38:29 -07:00
Benjamin Pasero
376061acc4 debt - less type cases 2019-05-15 11:42:49 -07:00
Matt Bierner
fd1ac7561b Fix TS 3.5 compile errors
Fixing errors related to https://github.com/microsoft/TypeScript/issues/31380
2019-05-13 18:00:52 -07:00
Benjamin Pasero
dac56c1816 allow to provide a language mode when opening text editors 2019-05-07 15:05:54 +02:00