Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -32,96 +32,6 @@ export class HideWebViewEditorFindCommand extends Command {
}
}
export class SelectAllWebviewEditorCommand extends Command {
public static readonly ID = 'editor.action.webvieweditor.selectAll';
public runCommand(accessor: ServicesAccessor, args: any): void {
const webViewEditor = getActiveWebviewEditor(accessor);
if (webViewEditor) {
webViewEditor.selectAll();
}
}
}
export class CopyWebviewEditorCommand extends Command {
public static readonly ID = 'editor.action.webvieweditor.copy';
public runCommand(accessor: ServicesAccessor, args: any): void {
const webViewEditor = getActiveWebviewEditor(accessor);
if (webViewEditor) {
webViewEditor.copy();
}
}
}
export class PasteWebviewEditorCommand extends Command {
public static readonly ID = 'editor.action.webvieweditor.paste';
public runCommand(accessor: ServicesAccessor, args: any): void {
const webViewEditor = getActiveWebviewEditor(accessor);
if (webViewEditor) {
webViewEditor.paste();
}
}
}
export class CutWebviewEditorCommand extends Command {
public static readonly ID = 'editor.action.webvieweditor.cut';
public runCommand(accessor: ServicesAccessor, args: any): void {
const webViewEditor = getActiveWebviewEditor(accessor);
if (webViewEditor) {
webViewEditor.cut();
}
}
}
export class UndoWebviewEditorCommand extends Command {
public static readonly ID = 'editor.action.webvieweditor.undo';
public runCommand(accessor: ServicesAccessor, args: any): void {
const webViewEditor = getActiveWebviewEditor(accessor);
if (webViewEditor) {
webViewEditor.undo();
}
}
}
export class RedoWebviewEditorCommand extends Command {
public static readonly ID = 'editor.action.webvieweditor.redo';
public runCommand(accessor: ServicesAccessor, args: any): void {
const webViewEditor = getActiveWebviewEditor(accessor);
if (webViewEditor) {
webViewEditor.redo();
}
}
}
export class OpenWebviewDeveloperToolsAction extends Action {
static readonly ID = 'workbench.action.webview.openDeveloperTools';
static readonly LABEL = nls.localize('openToolsLabel', "Open Webview Developer Tools");
public constructor(
id: string,
label: string
) {
super(id, label);
}
public run(): Promise<any> {
const elements = document.querySelectorAll('webview.ready');
for (let i = 0; i < elements.length; i++) {
try {
(elements.item(i) as Electron.WebviewTag).openDevTools();
} catch (e) {
console.error(e);
}
}
return Promise.resolve(true);
}
}
export class ReloadWebviewAction extends Action {
static readonly ID = 'workbench.action.webview.reloadWebviewAction';
static readonly LABEL = nls.localize('refreshWebviewLabel', "Reload Webviews");