Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1 (#8722)

* Merge from vscode 4636be2b71c87bfb0bfe3c94278b447a5efcc1f1

* remove tests that aren't working
This commit is contained in:
Anthony Dresser
2019-12-18 00:14:28 -08:00
committed by GitHub
parent 0fd870d156
commit 30d9e9c141
289 changed files with 5537 additions and 3039 deletions

View File

@@ -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"

View File

@@ -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();

View File

@@ -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; }

View File

@@ -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(

View File

@@ -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('');

View File

@@ -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.