Revert "Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)" (#5562)

This reverts commit c9a4f8f664.
This commit is contained in:
Anthony Dresser
2019-05-21 14:19:32 -07:00
committed by GitHub
parent 7670104e4d
commit 81ae86ff79
325 changed files with 4497 additions and 3328 deletions

View File

@@ -330,7 +330,7 @@ class ShowAccessibilityHelpAction extends EditorAction {
id: 'editor.action.showAccessibilityHelp',
label: AccessibilityHelpNLS.showAccessibilityHelpAction,
alias: 'Show Accessibility Help',
precondition: null,
precondition: undefined,
kbOpts: {
kbExpr: EditorContextKeys.focus,
primary: (browser.isIE ? KeyMod.CtrlCmd | KeyCode.F1 : KeyMod.Alt | KeyCode.F1),

View File

@@ -84,7 +84,7 @@ class InspectTokens extends EditorAction {
id: 'editor.action.inspectTokens',
label: InspectTokensNLS.inspectTokensAction,
alias: 'Developer: Inspect Tokens',
precondition: null
precondition: undefined
});
}

View File

@@ -149,7 +149,7 @@ export class GotoLineAction extends BaseEditorQuickOpenAction {
id: 'editor.action.gotoLine',
label: GoToLineNLS.gotoLineActionLabel,
alias: 'Go to Line...',
precondition: null,
precondition: undefined,
kbOpts: {
kbExpr: EditorContextKeys.focus,
primary: KeyMod.CtrlCmd | KeyCode.KEY_G,

View File

@@ -82,7 +82,7 @@ export class QuickCommandAction extends BaseEditorQuickOpenAction {
id: 'editor.action.quickCommand',
label: QuickCommandNLS.quickCommandActionLabel,
alias: 'Command Palette',
precondition: null,
precondition: undefined,
kbOpts: {
kbExpr: EditorContextKeys.focus,
primary: (browser.isIE ? KeyMod.Alt | KeyCode.F1 : KeyCode.F1),

View File

@@ -26,12 +26,12 @@ let SCOPE_PREFIX = ':';
export class SymbolEntry extends QuickOpenEntryGroup {
private readonly name: string;
private readonly type: string;
private readonly description: string | null;
private readonly description: string | undefined;
private readonly range: Range;
private readonly editor: ICodeEditor;
private readonly decorator: IDecorator;
constructor(name: string, type: string, description: string | null, range: Range, highlights: IHighlight[], editor: ICodeEditor, decorator: IDecorator) {
constructor(name: string, type: string, description: string | undefined, range: Range, highlights: IHighlight[], editor: ICodeEditor, decorator: IDecorator) {
super();
this.name = name;
@@ -55,7 +55,7 @@ export class SymbolEntry extends QuickOpenEntryGroup {
return this.type;
}
public getDescription(): string | null {
public getDescription(): string | undefined {
return this.description;
}
@@ -169,7 +169,7 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
});
}
private symbolEntry(name: string, type: string, description: string | null, range: IRange, highlights: IHighlight[], editor: ICodeEditor, decorator: IDecorator): SymbolEntry {
private symbolEntry(name: string, type: string, description: string | undefined, range: IRange, highlights: IHighlight[], editor: ICodeEditor, decorator: IDecorator): SymbolEntry {
return new SymbolEntry(name, type, description, Range.lift(range), highlights, editor, decorator);
}
@@ -192,7 +192,7 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
if (highlights) {
// Show parent scope as description
let description: string | null = null;
let description: string | undefined = undefined;
if (element.containerName) {
description = element.containerName;
}

View File

@@ -19,7 +19,7 @@ import { EditOperation } from 'vs/editor/common/core/editOperation';
import { IPosition, Position as Pos } from 'vs/editor/common/core/position';
import { Range } from 'vs/editor/common/core/range';
import * as editorCommon from 'vs/editor/common/editorCommon';
import { ITextModel } from 'vs/editor/common/model';
import { ITextModel, ITextSnapshot } from 'vs/editor/common/model';
import { TextEdit, WorkspaceEdit, isResourceTextEdit } from 'vs/editor/common/modes';
import { IModelService } from 'vs/editor/common/services/modelService';
import { IResolvedTextEditorModel, ITextModelContentProvider, ITextModelService } from 'vs/editor/common/services/resolverService';
@@ -67,6 +67,10 @@ export class SimpleModel implements IResolvedTextEditorModel {
return this.model;
}
public createSnapshot(): ITextSnapshot {
return this.model.createSnapshot();
}
public isReadonly(): boolean {
return false;
}
@@ -348,7 +352,7 @@ export class StandaloneKeybindingService extends AbstractKeybindingService {
if (!keybinding) {
// This might be a removal keybinding item in user settings => accept it
result[resultLen++] = new ResolvedKeybindingItem(null, item.command, item.commandArgs, when, isDefault);
result[resultLen++] = new ResolvedKeybindingItem(undefined, item.command, item.commandArgs, when, isDefault);
} else {
const resolvedKeybindings = this.resolveKeybinding(keybinding);
for (const resolvedKeybinding of resolvedKeybindings) {

View File

@@ -17,7 +17,7 @@ class ToggleHighContrast extends EditorAction {
id: 'editor.action.toggleHighContrast',
label: ToggleHighContrastNLS.toggleHighContrast,
alias: 'Toggle High Contrast Theme',
precondition: null
precondition: undefined
});
this._originalThemeName = null;
}