mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 (#8722)
* Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 * remove tests that aren't working
This commit is contained in:
@@ -88,6 +88,10 @@
|
||||
"fileMatch": "/.vscode/tasks.json",
|
||||
"url": "vscode://schemas/tasks"
|
||||
},
|
||||
{
|
||||
"fileMatch": "%APP_SETTINGS_HOME%/tasks.json",
|
||||
"url": "vscode://schemas/tasks"
|
||||
},
|
||||
{
|
||||
"fileMatch": "%APP_SETTINGS_HOME%/snippets/*.json",
|
||||
"url": "vscode://schemas/snippets"
|
||||
|
||||
@@ -23,7 +23,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
const previewManager = new PreviewManager(extensionRoot, sizeStatusBarEntry, binarySizeStatusBarEntry, zoomStatusBarEntry);
|
||||
|
||||
context.subscriptions.push(vscode.window.registerWebviewEditorProvider(PreviewManager.viewType, previewManager));
|
||||
context.subscriptions.push(vscode.window.registerWebviewCustomEditorProvider(PreviewManager.viewType, previewManager));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('imagePreview.zoomIn', () => {
|
||||
previewManager.activePreview?.zoomIn();
|
||||
|
||||
@@ -13,7 +13,7 @@ import { BinarySizeStatusBarEntry } from './binarySizeStatusBarEntry';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
|
||||
export class PreviewManager implements vscode.WebviewEditorProvider {
|
||||
export class PreviewManager implements vscode.WebviewCustomEditorProvider {
|
||||
|
||||
public static readonly viewType = 'imagePreview.previewEditor';
|
||||
|
||||
@@ -28,10 +28,10 @@ export class PreviewManager implements vscode.WebviewEditorProvider {
|
||||
) { }
|
||||
|
||||
public async resolveWebviewEditor(
|
||||
input: { readonly resource: vscode.Uri, },
|
||||
resource: vscode.Uri,
|
||||
webviewEditor: vscode.WebviewPanel,
|
||||
): Promise<vscode.WebviewEditorCapabilities> {
|
||||
const preview = new Preview(this.extensionRoot, input.resource, webviewEditor, this.sizeStatusBarEntry, this.binarySizeStatusBarEntry, this.zoomStatusBarEntry);
|
||||
): Promise<void> {
|
||||
const preview = new Preview(this.extensionRoot, resource, webviewEditor, this.sizeStatusBarEntry, this.binarySizeStatusBarEntry, this.zoomStatusBarEntry);
|
||||
this._previews.add(preview);
|
||||
this.setActivePreview(preview);
|
||||
|
||||
@@ -44,8 +44,6 @@ export class PreviewManager implements vscode.WebviewEditorProvider {
|
||||
this.setActivePreview(undefined);
|
||||
}
|
||||
});
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
public get activePreview() { return this._activePreview; }
|
||||
|
||||
@@ -52,7 +52,7 @@ class PreviewStore extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
export class MarkdownPreviewManager extends Disposable implements vscode.WebviewPanelSerializer, vscode.WebviewEditorProvider {
|
||||
export class MarkdownPreviewManager extends Disposable implements vscode.WebviewPanelSerializer, vscode.WebviewCustomEditorProvider {
|
||||
private static readonly markdownPreviewActiveContextKey = 'markdownPreviewFocus';
|
||||
|
||||
private readonly _topmostLineMonitor = new TopmostLineMonitor();
|
||||
@@ -70,7 +70,7 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
||||
) {
|
||||
super();
|
||||
this._register(vscode.window.registerWebviewPanelSerializer(DynamicMarkdownPreview.viewType, this));
|
||||
this._register(vscode.window.registerWebviewEditorProvider('vscode.markdown.preview.editor', this));
|
||||
this._register(vscode.window.registerWebviewCustomEditorProvider('vscode.markdown.preview.editor', this));
|
||||
}
|
||||
|
||||
public refresh() {
|
||||
@@ -149,11 +149,11 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
||||
}
|
||||
|
||||
public async resolveWebviewEditor(
|
||||
input: { readonly resource: vscode.Uri; },
|
||||
resource: vscode.Uri,
|
||||
webview: vscode.WebviewPanel
|
||||
): Promise<vscode.WebviewEditorCapabilities> {
|
||||
): Promise<void> {
|
||||
const preview = DynamicMarkdownPreview.revive(
|
||||
{ resource: input.resource, locked: false, resourceColumn: vscode.ViewColumn.One },
|
||||
{ resource, locked: false, resourceColumn: vscode.ViewColumn.One },
|
||||
webview,
|
||||
this._contentProvider,
|
||||
this._previewConfigurations,
|
||||
@@ -161,7 +161,6 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
||||
this._topmostLineMonitor,
|
||||
this._contributions);
|
||||
this.registerStaticPreview(preview);
|
||||
return {};
|
||||
}
|
||||
|
||||
private createNewDynamicPreview(
|
||||
|
||||
@@ -252,11 +252,11 @@ export class PlatformService implements IPlatformService {
|
||||
outputChannel.appendLine(localize('platformService.RunStreamedCommand.ExitedWithSignal', " >>> {0} … exited with signal: {1}", command, signal));
|
||||
}
|
||||
});
|
||||
child.stdout.on('data', (data: string | Buffer) => {
|
||||
child.stdout!.on('data', (data: string | Buffer) => {
|
||||
stdoutData.push(data.toString());
|
||||
this.outputDataChunk(data, outputChannel, localize('platformService.RunCommand.stdout', " stdout: "));
|
||||
});
|
||||
child.stderr.on('data', (data: string | Buffer) => { this.outputDataChunk(data, outputChannel, localize('platformService.RunCommand.stderr', " stderr: ")); });
|
||||
child.stderr!.on('data', (data: string | Buffer) => { this.outputDataChunk(data, outputChannel, localize('platformService.RunCommand.stderr', " stderr: ")); });
|
||||
|
||||
await child;
|
||||
return stdoutData.join('');
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Language Features for Search Result files
|
||||
|
||||
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
|
||||
|
||||
This extension provides Syntax Highlighting, Symbol Infomation, Result Highlighting, and Go to Definition capabilities for the Search Results Editor.
|
||||
|
||||
Reference in New Issue
Block a user