mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 09:35:37 -05:00
Merge from vscode e0762af258c0b20320ed03f3871a41967acc4421 (#7404)
* Merge from vscode e0762af258c0b20320ed03f3871a41967acc4421 * readd svgs
This commit is contained in:
@@ -8,7 +8,6 @@ import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { isWeb } from 'vs/base/common/platform';
|
||||
import { startsWith } from 'vs/base/common/strings';
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import * as modes from 'vs/editor/common/modes';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
|
||||
@@ -151,7 +150,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
||||
webview.setName(value);
|
||||
}
|
||||
|
||||
public $setState(handle: WebviewPanelHandle, state: modes.WebviewEditorState): void {
|
||||
public $setState(handle: WebviewPanelHandle, state: modes.WebviewContentState): void {
|
||||
const webview = this.getWebviewEditorInput(handle);
|
||||
if (webview instanceof CustomFileEditorInput) {
|
||||
webview.setState(state);
|
||||
@@ -173,6 +172,11 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
||||
webview.webview.contentOptions = reviveWebviewOptions(options as any /*todo@mat */);
|
||||
}
|
||||
|
||||
public $setExtension(handle: WebviewPanelHandle, extensionId: ExtensionIdentifier, extensionLocation: UriComponents): void {
|
||||
const webview = this.getWebviewEditorInput(handle);
|
||||
webview.webview.extension = { id: extensionId, location: URI.revive(extensionLocation) };
|
||||
}
|
||||
|
||||
public $reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void {
|
||||
const webview = this.getWebviewEditorInput(handle);
|
||||
if (webview.isDisposed()) {
|
||||
@@ -250,7 +254,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
||||
return webviewEditorInput.getTypeId() !== WebviewInput.typeId && webviewEditorInput.viewType === viewType;
|
||||
},
|
||||
resolveWebview: async (webview) => {
|
||||
const handle = generateUuid();
|
||||
const handle = webview.id;
|
||||
this._webviewEditorInputs.add(handle, webview);
|
||||
this.hookupWebviewEventDelegate(handle, webview);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user