Commit Graph

16 Commits

Author SHA1 Message Date
Matt Bierner
2038b8fc7f Webview API prototype 3 (#44307)
* Webview API prototype 3

Part of #43713

Third try at refining the webview api. This pass reworks  #44165.  Major changes:

- Adds an `id` field to webviews. The id is provided by the extension and identifies the webview. It is used with the new event handling apis.

- Adds a new `onDidChangeActiveEditor` api. This is similar to `onDidChangeActiveTextEditor` but is also fired when you change webviews. It replaces the old `onFocus` and `onBlur` events on the webview itself

- Adds an `onDispose` event ot webviews. This is fired when a webview is closed by the user

- Perist webview state when the editor group changes. This is enabled for all webviews, not just those with keep alive.

* Throw error when trying to access disposed webview

* Improving webview documentation

* Clean up dispose management

* Throw if we receive a bad handle

* Move more event handling to input

* Simplify input updating

* Remove extra container property

* Fixing md security alert button

* Remove extra update container call

* Restore syncing of preview to active editor

* Fixing posting to webview

* Debounce preview updates

* Remove previewUri

* Enable direct window.postMessage instead of window.parent.postMessage

* Fixing scroll position not preserved when updating previews

* Revert parent.postMessage change.

Old behavior was correct

* Properly hide webview container on tab switch

* Make sure we only handle scroll events for the correct document

* Don't try setting negative scroll

* Revert vs code whitespace change
2018-02-26 10:06:50 -08:00
Matt Bierner
e1f33fbb07 Rename ext host / main thread editor to textEditor
Rename to make it more clear that these APIs are for `vscode.TextEditor`
2018-02-15 15:32:16 -08:00
Alex Dima
5b1d34e435 Use URI for IDocumentsAndEditorsDelta.removedDocuments 2018-02-08 16:18:47 +01:00
Johannes Rieken
ad85d6bb86 ExtHostDocumentsAndEditorsShape, #40169 2017-12-14 10:53:11 +01:00
Alex Dima
367dd10413 Rename RPCProtocol.get to RPCProtocol.getProxy (#36972) 2017-12-13 16:04:14 +01:00
Johannes Rieken
229093ec9e debt - remove unused 'usesCommandLink' telemetry 2017-10-02 14:40:03 +02:00
Johannes Rieken
0417a75e4f know decorations using command links v2, #29076 2017-08-23 12:23:39 +02:00
Johannes Rieken
eb4e09ba69 Revert "know decorations using command links, #29076"
This reverts commit 94c4b25a47.
2017-08-23 11:54:45 +02:00
Johannes Rieken
94c4b25a47 know decorations using command links, #29076 2017-08-23 11:50:58 +02:00
Alex Dima
2b3298af79 Use native proxies for renderer <-> ext host RPC communication 2017-08-16 10:26:25 +02:00
Alex Dima
20a45eef3a Add a mechanism to be a customer of the extension host (share lifecycle) and begin reducing usage of IThreadService 2017-08-15 18:26:51 +02:00
Johannes Rieken
44da540b4b fix #27949 2017-06-06 19:14:15 +02:00
Johannes Rieken
65645f489e fix #24507 2017-04-11 15:27:42 +02:00
Johannes Rieken
7d0805e00f Revert "adding TextDocument#isVisible and internals for a visbility change event, #15723"
This reverts commit a6a41fd6c3.
2017-03-24 12:26:51 +01:00
Johannes Rieken
a6a41fd6c3 adding TextDocument#isVisible and internals for a visbility change event, #15723 2017-03-23 11:21:16 +01:00
Johannes Rieken
1239cebb70 Merge branch 'joh/editors' 2017-03-06 12:40:47 +01:00