mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -6,11 +6,12 @@
|
||||
|
||||
import * as nls from 'vs/nls';
|
||||
import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes';
|
||||
import { ICommand, ICommonCodeEditor } from 'vs/editor/common/editorCommon';
|
||||
import { ICommand } from 'vs/editor/common/editorCommon';
|
||||
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
|
||||
import { editorAction, IActionOptions, EditorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions';
|
||||
import { registerEditorAction, IActionOptions, EditorAction, ServicesAccessor } from 'vs/editor/browser/editorExtensions';
|
||||
import { BlockCommentCommand } from './blockCommentCommand';
|
||||
import { LineCommentCommand, Type } from './lineCommentCommand';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
|
||||
abstract class CommentLineAction extends EditorAction {
|
||||
|
||||
@@ -21,7 +22,7 @@ abstract class CommentLineAction extends EditorAction {
|
||||
this._type = type;
|
||||
}
|
||||
|
||||
public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void {
|
||||
public run(accessor: ServicesAccessor, editor: ICodeEditor): void {
|
||||
let model = editor.getModel();
|
||||
if (!model) {
|
||||
return;
|
||||
@@ -42,7 +43,6 @@ abstract class CommentLineAction extends EditorAction {
|
||||
|
||||
}
|
||||
|
||||
@editorAction
|
||||
class ToggleCommentLineAction extends CommentLineAction {
|
||||
constructor() {
|
||||
super(Type.Toggle, {
|
||||
@@ -58,7 +58,6 @@ class ToggleCommentLineAction extends CommentLineAction {
|
||||
}
|
||||
}
|
||||
|
||||
@editorAction
|
||||
class AddLineCommentAction extends CommentLineAction {
|
||||
constructor() {
|
||||
super(Type.ForceAdd, {
|
||||
@@ -74,7 +73,6 @@ class AddLineCommentAction extends CommentLineAction {
|
||||
}
|
||||
}
|
||||
|
||||
@editorAction
|
||||
class RemoveLineCommentAction extends CommentLineAction {
|
||||
constructor() {
|
||||
super(Type.ForceRemove, {
|
||||
@@ -90,7 +88,6 @@ class RemoveLineCommentAction extends CommentLineAction {
|
||||
}
|
||||
}
|
||||
|
||||
@editorAction
|
||||
class BlockCommentAction extends EditorAction {
|
||||
|
||||
constructor() {
|
||||
@@ -107,7 +104,7 @@ class BlockCommentAction extends EditorAction {
|
||||
});
|
||||
}
|
||||
|
||||
public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void {
|
||||
public run(accessor: ServicesAccessor, editor: ICodeEditor): void {
|
||||
var commands: ICommand[] = [];
|
||||
var selections = editor.getSelections();
|
||||
|
||||
@@ -120,3 +117,8 @@ class BlockCommentAction extends EditorAction {
|
||||
editor.pushUndoStop();
|
||||
}
|
||||
}
|
||||
|
||||
registerEditorAction(ToggleCommentLineAction);
|
||||
registerEditorAction(AddLineCommentAction);
|
||||
registerEditorAction(RemoveLineCommentAction);
|
||||
registerEditorAction(BlockCommentAction);
|
||||
@@ -5,8 +5,8 @@
|
||||
'use strict';
|
||||
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import { BlockCommentCommand } from 'vs/editor/contrib/comment/common/blockCommentCommand';
|
||||
import { testCommand } from 'vs/editor/test/common/commands/commandTestUtils';
|
||||
import { BlockCommentCommand } from 'vs/editor/contrib/comment/blockCommentCommand';
|
||||
import { testCommand } from 'vs/editor/test/browser/testCommand';
|
||||
import { CommentMode } from 'vs/editor/test/common/commentMode';
|
||||
|
||||
function testBlockCommentCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import { ILinePreflightData, IPreflightData, ISimpleModel, LineCommentCommand, Type } from 'vs/editor/contrib/comment/common/lineCommentCommand';
|
||||
import { testCommand } from 'vs/editor/test/common/commands/commandTestUtils';
|
||||
import { ILinePreflightData, IPreflightData, ISimpleModel, LineCommentCommand, Type } from 'vs/editor/contrib/comment/lineCommentCommand';
|
||||
import { testCommand } from 'vs/editor/test/browser/testCommand';
|
||||
import { CommentMode } from 'vs/editor/test/common/commentMode';
|
||||
import * as modes from 'vs/editor/common/modes';
|
||||
import { NULL_STATE } from 'vs/editor/common/modes/nullMode';
|
||||
Reference in New Issue
Block a user